From 6cc5761fd2011fd5c47845dd9950dfa8405daae1 Mon Sep 17 00:00:00 2001 From: Alex Ogier Date: Sat, 14 Feb 2015 18:01:23 -0500 Subject: Fixed noisy test case for the new boolFlag --- bool_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bool_test.go b/bool_test.go index 72a12be..19aa762 100644 --- a/bool_test.go +++ b/bool_test.go @@ -5,6 +5,7 @@ package pflag_test import ( + "bytes" "fmt" "strconv" "testing" @@ -156,6 +157,8 @@ func TestImplicitFalse(t *testing.T) { func TestInvalidValue(t *testing.T) { var tristate triStateValue f := setUpFlagSet(&tristate) + var buf bytes.Buffer + f.SetOutput(&buf) err := f.Parse([]string{"--tristate=invalid"}) if err == nil { t.Fatal("expected an error but did not get any, tristate has value", tristate) -- cgit v1.2.3