securityos/node_modules/shell-parse/tests/multi-line-strings.js

19 lines
378 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
var test = require('tape')
var parse = require('../parser')
test('Multi-line strings', function (t) {
var input = [
'"This',
'is a',
'multiline',
'string"'
].join('\n')
var arg = parse(input, 'argument')
t.deepEqual(arg, {
type: 'literal',
value: 'This\nis a\nmultiline\nstring'
}, 'multi-line string literals are one argument')
t.end()
})