[Pkg-javascript-commits] [node-shell-quote] 38/137: failing test for | and & ops
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Aug 25 19:19:37 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 d81773643cbc2e25576884d606165dc87e8bbfac
Author: James Halliday <mail at substack.net>
Date: Mon May 13 02:40:20 2013 -0700
failing test for | and & ops
---
test/op.js | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/test/op.js b/test/op.js
new file mode 100644
index 0000000..48b32b5
--- /dev/null
+++ b/test/op.js
@@ -0,0 +1,15 @@
+var test = require('tape');
+var parse = require('../').parse;
+
+test('operators', function (t) {
+ t.same(parse('beep | boop'), [ 'beep', { op: '|' }, 'boop' ]);
+ t.same(parse('beep|boop'), [ 'beep', { op: '|' }, 'boop' ]);
+ t.same(parse('beep \\| boop'), [ 'beep', '|', 'boop' ]);
+ t.same(parse('beep "|boop"'), [ 'beep', '|boop' ]);
+ t.same(parse('echo zing &'), [ 'echo', 'zing', { op: '&' } ]);
+ t.same(parse('echo zing&'), [ 'echo', 'zing', { op: '&' } ]);
+ t.same(parse('echo zing\\&'), [ 'echo', 'zing&' ]);
+ t.same(parse('echo "zing\\&"'), [ 'echo', 'zing&' ]);
+
+ 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