@@ -531,7 +531,7 @@ func TestParsing(t *testing.T) {
531531 t .Setenv (k , v )
532532 }
533533
534- got , gotErr := tt .cmd .Parse (tio .args ... )
534+ got , gotErr := tt .cmd .ParseThese (tio .args ... )
535535 if tio .expErr != nil && gotErr == nil {
536536 t .Fatalf ("expected error %[1]T: %[1]v, got no error" , tio .expErr )
537537 }
@@ -656,7 +656,7 @@ func TestOptLookups(t *testing.T) {
656656
657657 // with both options present
658658 {
659- c := in .ParseOrExit ("-ahello" , "-bworld" )
659+ c := in .ParseTheseOrExit ("-ahello" , "-bworld" )
660660 // straight getting the opts
661661 {
662662 optA := Get [string ](c , "a" )
@@ -683,7 +683,7 @@ func TestOptLookups(t *testing.T) {
683683
684684 // with only the first option 'a' present
685685 {
686- c := in .ParseOrExit ("-ahello" )
686+ c := in .ParseTheseOrExit ("-ahello" )
687687 // first one should be there, second one shouldn't
688688 {
689689 optA , ok := Lookup [string ](c , "a" )
@@ -740,7 +740,7 @@ func TestOptLookups(t *testing.T) {
740740
741741 // with both options present
742742 {
743- c := in .ParseOrExit ("-ahello" , "-bworld" )
743+ c := in .ParseTheseOrExit ("-ahello" , "-bworld" )
744744 // straight getting the opts
745745 {
746746 optA := Get [string ](c , "a" )
@@ -767,7 +767,7 @@ func TestOptLookups(t *testing.T) {
767767
768768 // with only the first option 'a' provided
769769 {
770- c := in .ParseOrExit ("-ahello" )
770+ c := in .ParseTheseOrExit ("-ahello" )
771771 // first one should be there, second one default
772772 {
773773 optA , ok := Lookup [string ](c , "a" )
@@ -812,7 +812,7 @@ func TestArgLookups(t *testing.T) {
812812
813813 // with both args present
814814 {
815- c := in .ParseOrExit ("hello" , "world" )
815+ c := in .ParseTheseOrExit ("hello" , "world" )
816816 // straight getting the args
817817 {
818818 arg1 := Get [string ](c , "arg1" )
@@ -839,7 +839,7 @@ func TestArgLookups(t *testing.T) {
839839
840840 // with only the first arg 'arg1' present
841841 {
842- c := in .ParseOrExit ("hello" )
842+ c := in .ParseTheseOrExit ("hello" )
843843 // first one should be there, second one shouldn't
844844 {
845845 arg1 , ok := Lookup [string ](c , "arg1" )
@@ -933,7 +933,7 @@ options:
933933` ,
934934 },
935935 } {
936- _ , err := tt .cmd .Parse (tt .cliArgs ... )
936+ _ , err := tt .cmd .ParseThese (tt .cliArgs ... )
937937 gotHelpMsg := err .Error ()
938938 if gotHelpMsg != tt .expHelpMsg {
939939 t .Errorf ("%s: expected:\n %s\n got:\n %s" , tt .Case , tt .expHelpMsg , gotHelpMsg )
0 commit comments