-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
all the tests now ported, some failures
- Loading branch information
James Halliday
committed
Jun 25, 2013
1 parent
9448754
commit 64239ed
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
var parse = require('../'); | ||
var test = require('tape'); | ||
|
||
test('parse with modifier functions' , function (t) { | ||
t.plan(1); | ||
|
||
var argv = parse([ '-b', '123' ], { boolean: 'b' }); | ||
t.deepEqual(argv, { b: true, _: ['123'] }); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var parse = require('../'); | ||
var test = require('tap').test; | ||
|
||
test('whitespace should be whitespace' , function (t) { | ||
t.plan(1); | ||
var x = parse([ '-x', '\t' ]).x; | ||
t.equal(x, '\t'); | ||
}); |