Skip to content

Commit c474a64

Browse files
author
James Halliday
committedMay 18, 2013
another passing dash test
1 parent 77058c6 commit c474a64

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎test/dash.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var optimist = require('../index');
22
var test = require('tap').test;
33

44
test('-', function (t) {
5-
t.plan(3);
5+
t.plan(5);
66
t.deepEqual(
77
fix(optimist.parse([ '-n', '-' ])),
88
{ n: '-', _: [] }
@@ -15,6 +15,14 @@ test('-', function (t) {
1515
fix(optimist.parse([ '-f-' ])),
1616
{ f: '-', _: [] }
1717
);
18+
t.deepEqual(
19+
fix(optimist([ '-b', '-' ]).boolean('b').argv),
20+
{ b: true, _: [ '-' ] }
21+
);
22+
t.deepEqual(
23+
fix(optimist([ '-s', '-' ]).string('s').argv),
24+
{ s: '-', _: [] }
25+
);
1826
});
1927

2028
function fix (obj) {

0 commit comments

Comments
 (0)
Please sign in to comment.