[Pkg-javascript-commits] [node-shell-quote] 15/137: failing tests for unimplemented env interpolation
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Aug 25 19:19:35 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-shell-quote.
commit 590534ae8eced91974a4be8f2b6bc7dcb53e3211
Author: James Halliday <mail at substack.net>
Date: Sun Apr 14 19:44:13 2013 -0700
failing tests for unimplemented env interpolation
---
test/env.js | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/test/env.js b/test/env.js
new file mode 100644
index 0000000..0d65c2c
--- /dev/null
+++ b/test/env.js
@@ -0,0 +1,19 @@
+var test = require('tap').test;
+var parse = require('../').parse;
+
+test('expand environment variables', function (t) {
+ t.same(parse('a $XYZ c', { XYZ: 'b' }), [ 'a', 'b', 'c' ]);
+ t.same(parse('a${XYZ}c', { XYZ: 'b' }), [ 'abc' ]);
+ t.same(parse('a${XYZ}c $XYZ', { XYZ: 'b' }), [ 'abcb' ]);
+ t.same(parse('"_$X-$Y_"', { X: 'a', Y: 'b' }), [ '_a-b_' ]);
+ t.same(parse("'_$X-$Y_'", { X: 'a', Y: 'b' }), [ '_$X-$Y_' ]);
+ t.same(parse('qrs"$zzz"wxy', { zzz: 'tuv' }), [ 'qrstuvwxy' ]);
+ t.same(parse("qrs'$zzz'wxy", { zzz: 'tuv' }), [ 'qrs$zzzwxy' ]);
+ t.same(parse("qrs${zzz}wxy"), [ 'qrswxy' ]);
+ t.same(parse("ab$x", { x: 'c' }), [ 'abc' ]);
+ t.same(parse("ab\\$x", { x: 'c' }), [ 'ab$x' ]);
+ t.same(parse("ab${x}def", { x: 'c' }), [ 'abcdef' ]);
+ t.same(parse("ab\\${x}def", { x: 'c' }), [ 'ab${x}def' ]);
+
+ t.end();
+});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-shell-quote.git
More information about the Pkg-javascript-commits
mailing list