Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 02df5d8a0d3ee0d4c6e1b919d8decebc24ac0fa9 1 parent 691c61e
@puzrin puzrin authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 test/nargs.js
View
15 test/nargs.js
@@ -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: '*' });
Please sign in to comment.
Something went wrong with that request. Please try again.