/opt/canhelp/node_modules/shell-quote/test
NameSizeModeActions
comment.js6420644editdlrm
env.js18540644editdlrm
env_fn.js4830644editdlrm
op.js30530644editdlrm
parse.js14550644editdlrm
quote.js16500644editdlrm
set.js5650644editdlrm
Edit: /opt/canhelp/node_modules/shell-quote/test/env_fn.js (483B)
'use strict'; var test = require('tape'); var parse = require('../').parse; function getEnv() { return 'xxx'; } function getEnvObj() { return { op: '@@' }; } test('functional env expansion', function (t) { t.plan(4); t.same(parse('a $XYZ c', getEnv), ['a', 'xxx', 'c']); t.same(parse('a $XYZ c', getEnvObj), ['a', { op: '@@' }, 'c']); t.same(parse('a${XYZ}c', getEnvObj), ['a', { op: '@@' }, 'c']); t.same(parse('"a $XYZ c"', getEnvObj), ['a ', { op: '@@' }, ' c']); });