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

20 lines
358 B
JavaScript

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()
})