@@ -879,6 +879,29 @@ describe('yargs-parser', function () {
879879 argv . should . have . property ( 'n' , 123 )
880880 } )
881881
882+ it ( 'should set n to the numeric value 123, with n at the end of a group' , function ( ) {
883+ var argv = parser ( [ '-ab5n123' ] )
884+ argv . should . have . property ( 'a' , true )
885+ argv . should . have . property ( 'b' , true )
886+ argv . should . have . property ( '5' , true )
887+ argv . should . have . property ( 'n' , 123 )
888+ argv . should . have . property ( '_' ) . with . length ( 0 )
889+ } )
890+
891+ it ( 'should set n to the numeric value 123, with = as separator' , function ( ) {
892+ var argv = parser ( [ '-n=123' ] )
893+ argv . should . have . property ( 'n' , 123 )
894+ } )
895+
896+ it ( 'should set n to the numeric value 123, with n at the end of a group and = as separator' , function ( ) {
897+ var argv = parser ( [ '-ab5n=123' ] )
898+ argv . should . have . property ( 'a' , true )
899+ argv . should . have . property ( 'b' , true )
900+ argv . should . have . property ( '5' , true )
901+ argv . should . have . property ( 'n' , 123 )
902+ argv . should . have . property ( '_' ) . with . length ( 0 )
903+ } )
904+
882905 it ( 'should set option "1" to true, option "2" to true, and option "3" to numeric value 456' , function ( ) {
883906 var argv = parser ( [ '-123' , '456' ] )
884907 argv . should . have . property ( '1' , true )
0 commit comments