securityos/node_modules/shell-parse/tests/builtin.js

20 lines
358 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
var test = require('tape')
var parse = require('../parser')
test('condition builtins', function (t) {
t.deepEqual(parse('[ 0 ]')[0], {
type: 'command',
command: "[",
args: [
{ type: 'literal', value: '0' },
{ type: 'literal', value: ']' },
],
redirects: [],
env: {},
control: ';',
next: null
})
t.end()
})