Permalink
Browse files

added test for #48, remove `skip` when fixed

  • Loading branch information...
1 parent 691c61e commit 02df5d8a0d3ee0d4c6e1b919d8decebc24ac0fa9 @puzrin puzrin committed Feb 15, 2013
Showing with 15 additions and 0 deletions.
  1. +15 −0 test/nargs.js
View
@@ -724,6 +724,21 @@ describe('nargs', function () {
});
});
+ // Added after bug in ndoc
+ it.skip('test a Positional that specifies unlimited nargs, alternate definition', function () {
+ parser = new ArgumentParser({debug: true});
+ parser.addArgument([ 'paths' ], {
+ help: 'Source files location',
+ metavar: 'PATH',
+ action: 'append',
+ nargs: '+'
+ });
+
+ args = parser.parseArgs([ 'lib/', 'examples/' ]);
+ assert.deepEqual(args, { paths: [ 'lib/', 'examples/' ] });
+ });
+
+
it('test a Positional with unlimited nargs followed by one with 1', function () {
parser = new ArgumentParser({debug: true});
parser.addArgument([ 'foo' ], { nargs: '*' });

0 comments on commit 02df5d8

Please sign in to comment.