[Pkg-javascript-commits] [node-shell-quote] 65/137: test for functional env expansion
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Aug 25 19:19:40 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 666395f9f195241c6077f242dc4f2851bed95f8d
Author: James Halliday <mail at substack.net>
Date: Mon May 13 05:19:42 2013 -0700
test for functional env expansion
---
test/env_fn.js | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/test/env_fn.js b/test/env_fn.js
new file mode 100644
index 0000000..0762f2d
--- /dev/null
+++ b/test/env_fn.js
@@ -0,0 +1,17 @@
+var test = require('tape');
+var parse = require('../').parse;
+
+test('functional env expansion', function (t) {
+ t.plan(2);
+
+ t.same(parse('a $XYZ c', getEnv), [ 'a', 'xxx', 'c' ]);
+ t.same(parse('a $XYZ c', getEnvObj), [ 'a', { op: '@@' }, 'c' ]);
+
+ function getEnv (key) {
+ return 'xxx';
+ }
+
+ function getEnvObj (key) {
+ return { op: '@@' };
+ }
+});
--
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