From be188701360258ea70abc362c28ac8d824278fce Mon Sep 17 00:00:00 2001 From: bep Date: Wed, 13 May 2015 11:54:47 +0200 Subject: [PATCH] Fix two failing tests The error message has changed ever so slightly. --- cobra_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cobra_test.go b/cobra_test.go index 56746495..10a8a1e6 100644 --- a/cobra_test.go +++ b/cobra_test.go @@ -481,7 +481,7 @@ func TestChildCommandFlags(t *testing.T) { t.Errorf("invalid input should generate error") } - if !strings.Contains(r.Output, "invalid argument \"10E\" for -i10E") { + if !strings.Contains(r.Output, "invalid argument \"10E\" for i10E") { t.Errorf("Wrong error message displayed, \n %s", r.Output) } } @@ -777,7 +777,7 @@ func TestFlagsBeforeCommand(t *testing.T) { // With parsing error properly reported x = fullSetupTest("-i10E echo") - if !strings.Contains(x.Output, "invalid argument \"10E\" for -i10E") { + if !strings.Contains(x.Output, "invalid argument \"10E\" for i10E") { t.Errorf("Wrong error message displayed, \n %s", x.Output) }