aboutsummaryrefslogtreecommitdiff
path: root/flag_test.go
diff options
context:
space:
mode:
authorspf13 <[email protected]>2014-06-27 09:58:16 -0400
committerspf13 <[email protected]>2014-06-27 09:58:16 -0400
commit2790b68253e8df395da60096bcea40e90daa3b41 (patch)
treeac8b8a984fdff373eb19f9f101580118c4e0a401 /flag_test.go
parentb9035d0aef89271f98c3a2435e9cc614ffe5e81e (diff)
Fixing issues so test pass again
Diffstat (limited to 'flag_test.go')
-rw-r--r--flag_test.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/flag_test.go b/flag_test.go
index aa8682f..4d95b15 100644
--- a/flag_test.go
+++ b/flag_test.go
@@ -7,13 +7,14 @@ package pflag_test
import (
"bytes"
"fmt"
+ "io/ioutil"
"os"
"sort"
"strings"
"testing"
"time"
- . "github.com/ogier/pflag"
+ . "github.com/spf13/pflag"
)
var (
@@ -195,8 +196,9 @@ func TestShorthand(t *testing.T) {
"--",
notaflag,
}
- if err := f.Parse(args); err != nil {
- t.Fatal(err)
+ f.SetOutput(ioutil.Discard)
+ if err := f.Parse(args); err == nil {
+ t.Error("--i-look-like-a-flag should throw an error")
}
if !f.Parsed() {
t.Error("f.Parse() = false after Parse")