@@ -512,7 +512,7 @@ providers:
512512 },
513513 },
514514 {
515- name : "shorthand file" ,
515+ name : "positional parameter file" ,
516516 test : func (t * testing.T ) {
517517 os .Args = append (os .Args , "mokapi.exe" , "foo.json" )
518518
@@ -527,7 +527,7 @@ providers:
527527 },
528528 },
529529 {
530- name : "shorthand http" ,
530+ name : "positional parameter http" ,
531531 test : func (t * testing.T ) {
532532 os .Args = append (os .Args , "mokapi.exe" , "http://foo.io/foo.json" )
533533
@@ -541,7 +541,7 @@ providers:
541541 },
542542 },
543543 {
544- name : "shorthand https" ,
544+ name : "positional parameter https" ,
545545 test : func (t * testing.T ) {
546546 os .Args = append (os .Args , "mokapi.exe" , "https://foo.io/foo.json" )
547547
@@ -555,7 +555,7 @@ providers:
555555 },
556556 },
557557 {
558- name : "shorthand git with https" ,
558+ name : "positional parameter git with https" ,
559559 test : func (t * testing.T ) {
560560 os .Args = append (os .Args , "mokapi.exe" , "git+https://foo.io/foo.json" )
561561
@@ -569,7 +569,7 @@ providers:
569569 },
570570 },
571571 {
572- name : "shorthand npm" ,
572+ name : "positional parameter npm" ,
573573 test : func (t * testing.T ) {
574574 os .Args = append (os .Args , "mokapi.exe" , "npm://bar/foo.txt?scope=@foo" )
575575
@@ -583,7 +583,7 @@ providers:
583583 },
584584 },
585585 {
586- name : "shorthand not supported" ,
586+ name : "positional parameter not supported" ,
587587 test : func (t * testing.T ) {
588588 os .Args = append (os .Args , "mokapi.exe" , "foo://bar" )
589589
@@ -594,6 +594,18 @@ providers:
594594 require .EqualError (t , err , "positional argument is not supported: foo://bar" )
595595 },
596596 },
597+ {
598+ name : "positional parameter Windows path" ,
599+ test : func (t * testing.T ) {
600+ os .Args = append (os .Args , "mokapi.exe" , "C:\\ bar" )
601+
602+ cfg := static.Config {}
603+ err := decoders .Load ([]decoders.ConfigDecoder {decoders .NewFlagDecoder ()}, & cfg )
604+ require .NoError (t , err )
605+ err = cfg .Parse ()
606+ require .Equal (t , "C:\\ bar" , cfg .Providers .File .Filenames [0 ])
607+ },
608+ },
597609 }
598610
599611 for _ , tc := range testcases {
0 commit comments