Skip to content

Commit

Permalink
Fixed noisy test case for the new boolFlag
Browse files Browse the repository at this point in the history
  • Loading branch information
ogier committed Feb 14, 2015
1 parent ed64959 commit 6cc5761
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package pflag_test

import (
"bytes"
"fmt"
"strconv"
"testing"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6cc5761

Please sign in to comment.