diff options
| author | Alex Ogier <[email protected]> | 2014-06-08 04:40:52 -0400 |
|---|---|---|
| committer | Alex Ogier <[email protected]> | 2014-06-08 04:40:52 -0400 |
| commit | e4f7d00f344b0954fa3791a8527d10ba7334eceb (patch) | |
| tree | 0bbcd0e3bb9b742ff4e6e1090fa67a428d6357c6 /flag_test.go | |
| parent | f235ad33d48a41975db57c0b52cec7b70529db0d (diff) | |
| parent | da6063afdc059a0c9596a8a8c5462a995a074762 (diff) | |
Merge pull request #7 from alecthomas/master
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) |
