aboutsummaryrefslogtreecommitdiff
path: root/flag_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'flag_test.go')
-rw-r--r--flag_test.go6
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)