summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch')
-rw-r--r--gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch b/gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch
new file mode 100644
index 00000000000..7408d4ec168
--- /dev/null
+++ b/gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch
@@ -0,0 +1,28 @@
1Backported from upstream PR: https://github.com/urfave/cli/pull/1299
2---
3diff --git a/app_test.go b/app_test.go
4index 33024ff..6b3aaa3 100644
5--- a/app_test.go
6+++ b/app_test.go
7@@ -513,18 +513,18 @@ func TestApp_RunAsSubcommandParseFlags(t *testing.T) {
8 func TestApp_RunAsSubCommandIncorrectUsage(t *testing.T) {
9 a := App{
10 Flags: []Flag{
11- StringFlag{Name: "--foo"},
12+ StringFlag{Name: "foo"},
13 },
14 Writer: bytes.NewBufferString(""),
15 }
16
17 set := flag.NewFlagSet("", flag.ContinueOnError)
18- _ = set.Parse([]string{"", "---foo"})
19+ _ = set.Parse([]string{"", "-bar"})
20 c := &Context{flagSet: set}
21
22 err := a.RunAsSubcommand(c)
23
24- expect(t, err, errors.New("bad flag syntax: ---foo"))
25+ expect(t, err.Error(), "flag provided but not defined: -bar")
26 }
27
28 func TestApp_CommandWithFlagBeforeTerminator(t *testing.T) {