Skip to content

Commit

Permalink
some more passing double-char op tests
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed May 13, 2013
1 parent 3998b0f commit fbc6e5c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/op.js
Expand Up @@ -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();
});

0 comments on commit fbc6e5c

Please sign in to comment.