diff options
| author | spf13 <[email protected]> | 2014-06-27 09:29:20 -0400 |
|---|---|---|
| committer | spf13 <[email protected]> | 2014-06-27 09:29:20 -0400 |
| commit | b9035d0aef89271f98c3a2435e9cc614ffe5e81e (patch) | |
| tree | a47a1b482eced55d5af0d60065b87c590ff75868 /flag_test.go | |
| parent | 94e98a55fb412fcbcfc302555cb990f5e1590627 (diff) | |
| parent | e4f7d00f344b0954fa3791a8527d10ba7334eceb (diff) | |
Merge branch 'master' of https://github.com/ogier/pflag
Conflicts:
flag.go
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) |
