aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flag_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/flag_test.go b/flag_test.go
index ea36507..99c9903 100644
--- a/flag_test.go
+++ b/flag_test.go
@@ -222,16 +222,16 @@ func TestSetOutput(t *testing.T) {
// This tests that one can reset the flags. This still works but not well, and is
// superseded by FlagSet.
func TestChangingArgs(t *testing.T) {
- ResetForTesting(func() { panic("ouch") })//t.Fatal("bad parse") })
+ ResetForTesting(func() { t.Fatal("bad parse") })
oldArgs := os.Args
defer func() { os.Args = oldArgs }()
- os.Args = []string{"cmd", "--before", "subcmd", "--after", "args"}
+ os.Args = []string{"cmd", "--before", "subcmd"}
before := Bool("before", false, "")
if err := CommandLine().Parse(os.Args[1:]); err != nil {
t.Fatal(err)
}
cmd := Arg(0)
- os.Args = Args()
+ os.Args = []string{"subcmd", "--after", "args"}
after := Bool("after", false, "")
Parse()
args := Args()