From 37a4355faa3871394f60ee207608f1df565cd37f Mon Sep 17 00:00:00 2001 From: Albert Nigmatzianov Date: Wed, 19 Apr 2017 10:48:35 +0200 Subject: [PATCH] Fix tests --- cobra_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cobra_test.go b/cobra_test.go index b78a656..48d13d3 100644 --- a/cobra_test.go +++ b/cobra_test.go @@ -569,7 +569,7 @@ func TestChildCommandFlags(t *testing.T) { if r.Error == nil { t.Errorf("invalid input should generate error") } - if !strings.Contains(r.Error.Error(), "invalid argument \"10E\" for i10E") { + if !strings.Contains(r.Error.Error(), "invalid syntax") { t.Errorf("Wrong error message displayed, \n %s", r.Error) } } @@ -987,7 +987,7 @@ func TestFlagsBeforeCommand(t *testing.T) { // With parsing error properly reported x = fullSetupTest("-i10E echo") - if !strings.Contains(x.Error.Error(), "invalid argument \"10E\" for i10E") { + if !strings.Contains(x.Error.Error(), "invalid syntax") { t.Errorf("Wrong error message displayed, \n %s", x.Error) }