[Pkg-javascript-commits] [node-shell-quote] 30/137: some extra metacharacter tests just to be sure
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Aug 25 19:19:36 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 a6782aeb931221a459f9cebc371c2311ad680992
Author: James Halliday <mail at substack.net>
Date: Sun Apr 14 21:20:36 2013 -0700
some extra metacharacter tests just to be sure
---
test/env.js | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/test/env.js b/test/env.js
index b9f9001..b421721 100644
--- a/test/env.js
+++ b/test/env.js
@@ -17,3 +17,11 @@ test('expand environment variables', function (t) {
t.end();
});
+
+test('environment variables with metacharacters', function (t) {
+ t.same(parse('a $XYZ c', { XYZ: '"b"' }), [ 'a', '"b"', 'c' ]);
+ t.same(parse('a $XYZ c', { XYZ: '$X', X: 5 }), [ 'a', '$X', 'c' ]);
+ t.same(parse('a"$XYZ"c', { XYZ: "'xyz'" }), [ "a'xyz'c" ]);
+
+ 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