[Pkg-javascript-commits] [node-shell-quote] 77/137: tests for setting env vars

Bastien Roucariès rouca at moszumanska.debian.org
Fri Aug 25 19:19:41 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 f44b03906c60598470676edcabea79c4f7488407
Author: James Halliday <mail at substack.net>
Date:   Mon Jun 24 04:16:06 2013 -0700

    tests for setting env vars
---
 test/set.js | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/test/set.js b/test/set.js
new file mode 100644
index 0000000..64771f7
--- /dev/null
+++ b/test/set.js
@@ -0,0 +1,19 @@
+var test = require('tape');
+var parse = require('../').parse;
+
+test('set env vars', function (t) {
+    t.same(
+        parse('ABC=444 x y z'),
+        [ { key: 'X', value: '444' }, 'x', 'y', 'z' ]
+    );
+    t.same(
+        parse('ABC=3\\ 4\\ 5 x y z'),
+        [ { key: 'X', value: '3 4 5' }, 'x', 'y', 'z' ]
+    );
+    t.same(
+        parse('X="7 8 9" printx'),
+        [ { key: 'X', value: '7 8 9' }, 'printx' ]
+    );
+    
+    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