You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 7, 2018. It is now read-only.
For example if there is a short option "-t" and a shorthand "-1", both -1t and -t1 will generate errors.
The following tests show the issue.
"test shorthand first followed by short option": function(done){this.a.createOption(["-t","--terse"]);this.a.createOption(["--width"],{hasValue: true});this.a.addShorthand("-1",["--width","1"]);this.a.parse(["-1t"],done(function(errors,options){refute(errors);assert(options["-t"].isSet);assert.equals(options["--width"].value,"1");}));},"test short option followed by shorthand": function(done){this.a.createOption(["-t","--terse"]);this.a.createOption(["--width"],{hasValue: true});this.a.addShorthand("-1",["--width","1"]);this.a.parse(["-t1"],done(function(errors,options){refute(errors);assert(options["-t"].isSet);assert.equals(options["--width"].value,"1");}));},"test two shorthands followed by short option": function(done){this.a.createOption(["-t","--terse"]);this.a.createOption(["--width"],{hasValue: true});this.a.createOption(["--depth"],{hasValue: true});this.a.addShorthand("-1",["--width","1"]);this.a.addShorthand("-2",["--depth","2"]);this.a.parse(["-12t"],done(function(errors,options){refute(errors);assert(options["-t"].isSet);assert.equals(options["--width"].value,"1");assert.equals(options["--depth"].value,"2");}));},
The text was updated successfully, but these errors were encountered:
For example if there is a short option "-t" and a shorthand "-1", both -1t and -t1 will generate errors.
The following tests show the issue.
The text was updated successfully, but these errors were encountered: