[Pkg-javascript-commits] [node-shell-quote] 50/137: some more passing double-char op tests

Bastien Roucariès rouca at moszumanska.debian.org
Fri Aug 25 19:19:38 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 fbc6e5c40858ef4ea4d69651ac8fdf6c0c780eed
Author: James Halliday <mail at substack.net>
Date:   Mon May 13 03:16:51 2013 -0700

    some more passing double-char op tests
---
 test/op.js | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/test/op.js b/test/op.js
index 10a21eb..5e65927 100644
--- a/test/op.js
+++ b/test/op.js
@@ -26,5 +26,24 @@ test('double 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', { op: '||' }, 'boop' ]);
+    
+    t.same(parse('beep && boop'), [ 'beep', { op: '&&' }, 'boop' ]);
+    t.same(
+        parse('beep && boop || byte'),
+        [ 'beep', { op: '&&' }, 'boop', { op: '||' }, 'byte' ]
+    );
+    t.same(
+        parse('beep&&boop||byte'),
+        [ 'beep', { op: '&&' }, 'boop', { op: '||' }, 'byte' ]
+    );
+    t.same(
+        parse('beep\\&\\&boop||byte'),
+        [ 'beep&&boop', { op: '||' }, 'byte' ]
+    );
+    t.same(
+        parse('beep\\&&boop||byte'),
+        [ 'beep&', { op: '&' }, 'boop', { op: '||' }, 'byte' ]
+    );
+    
     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