File: errormessage.patch

package info (click to toggle)
golang-github-dnephin-cobra 1.5.1%2Bgit20170113.0.0e9ca70-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 456 kB
  • sloc: makefile: 5
file content (29 lines) | stat: -rw-r--r-- 843 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Last-Update: 2018-06-10
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=868617
Author: Dmitry Smirnov <onlyjob@debian.org>
Description: fix failing tests

--- a/cobra_test.go
+++ b/cobra_test.go
@@ -641,9 +641,9 @@
 
 	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)
 	}
 }
 
@@ -1061,9 +1061,9 @@
 	}
 
 	// 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)
 	}
 
 	//With quotes