Skip to content

Commit

Permalink
Add tests for glob patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
grncdr authored and James Halliday committed Oct 18, 2013
1 parent 89bc550 commit 3418892
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 10 additions & 0 deletions test/op.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,13 @@ test('double operators', function (t) {

t.end();
});

test('glob patterns', function (t) {
t.same(
parse('tap test/*.test.js'),
[ 'tap', { op: 'glob', pattern: 'test/*.test.js' } ]
);

t.same(parse('tap "test/*.test.js"'), ['tap', 'test/*.test.js']);
t.end();
})
1 change: 0 additions & 1 deletion test/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ test('parse shell commands', function (t) {
t.same(parse('a\\ b"c d"\\ e f'), [ 'a bc d e', 'f' ]);
t.same(parse('a\\ b"c d"\\ e\'f g\' h'), [ 'a bc d ef g', 'h' ]);
t.same(parse("x \"bl'a\"'h'"), ['x', "bl'ah"])
t.same(parse("x 'a'*"), ['x', 'a*'])

t.end();
});

0 comments on commit 3418892

Please sign in to comment.