aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ogier <[email protected]>2012-05-04 02:58:52 -0400
committerAlex Ogier <[email protected]>2012-05-04 02:58:52 -0400
commitbdbfd80cd32897166b7fd49def0c021eaf7a3262 (patch)
tree5db9ba0e498e19d9cdd89ad6dc91b7a306969b1e
parentc94d813e6a2097a944e16a27a309347f61ea3ad2 (diff)
Fix tests for interspersed parsing
-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()