diff options
| author | Alec Thomas <[email protected]> | 2014-04-02 10:59:38 -0400 |
|---|---|---|
| committer | Alec Thomas <[email protected]> | 2014-04-02 10:59:38 -0400 |
| commit | e101bb922e4d2da875b92062af867b7378d8ad5c (patch) | |
| tree | 77bfbf13bfe053cc4a9bc44312dc448646e6c05b /flag_test.go | |
| parent | f235ad33d48a41975db57c0b52cec7b70529db0d (diff) | |
Compatibility: commandLine -> CommandLine
Diffstat (limited to 'flag_test.go')
| -rw-r--r-- | flag_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/flag_test.go b/flag_test.go index 42d5483..aa8682f 100644 --- a/flag_test.go +++ b/flag_test.go @@ -97,7 +97,7 @@ func TestEverything(t *testing.T) { func TestUsage(t *testing.T) { called := false ResetForTesting(func() { called = true }) - if CommandLine().Parse([]string{"--x"}) == nil { + if GetCommandLine().Parse([]string{"--x"}) == nil { t.Error("parse did not fail for unknown flag") } if !called { @@ -224,7 +224,7 @@ func TestShorthand(t *testing.T) { func TestParse(t *testing.T) { ResetForTesting(func() { t.Error("bad parse") }) - testParse(CommandLine(), t) + testParse(GetCommandLine(), t) } func TestFlagSetParse(t *testing.T) { @@ -279,7 +279,7 @@ func TestChangingArgs(t *testing.T) { defer func() { os.Args = oldArgs }() os.Args = []string{"cmd", "--before", "subcmd"} before := Bool("before", false, "") - if err := CommandLine().Parse(os.Args[1:]); err != nil { + if err := GetCommandLine().Parse(os.Args[1:]); err != nil { t.Fatal(err) } cmd := Arg(0) |
