diff options
| author | Eric Paris <[email protected]> | 2015-04-07 16:50:29 -0400 |
|---|---|---|
| committer | Eric Paris <[email protected]> | 2015-04-28 18:37:40 -0400 |
| commit | 8824ec2f84efc5232daca3cb5403690b695190eb (patch) | |
| tree | 5565e551b0c1a9d1f9f7d90562d01c97edf31205 /bool_test.go | |
| parent | 60d4c375939ff7ba397a84117d5281256abb298f (diff) | |
Ability to mark flags as deprecated
They will not show up in usage or help, but they will still work.
The usage message will print on os.Stderr any time the flag is set.
Diffstat (limited to 'bool_test.go')
| -rw-r--r-- | bool_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bool_test.go b/bool_test.go index fe45b8d..2073590 100644 --- a/bool_test.go +++ b/bool_test.go @@ -156,7 +156,8 @@ func TestImplicitFalse(t *testing.T) { func TestInvalidValue(t *testing.T) { var tristate triStateValue f := setUpFlagSet(&tristate) - err := f.Parse([]string{"--tristate=invalid"}) + args := []string{"--tristate=invalid"} + _, err := parseReturnStderr(t, f, args) if err == nil { t.Fatal("expected an error but did not get any, tristate has value", tristate) } |
