Sha256: 91ddb40e5fbe4ce86bc99b2a0d3001dc1d13a2c1b3f0613acee2eee14447bbec
Contents?: true
Size: 541 Bytes
Versions: 76
Compression:
Stored size: 541 Bytes
Contents
var test = require('tape'); var parse = require('../').parse; 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' ]); function getEnv (key) { return 'xxx'; } function getEnvObj (key) { return { op: '@@' }; } });
Version data entries
76 entries across 76 versions & 4 rubygems