summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch
diff options
context:
space:
mode:
authorSarah Morgensen <iskarian@mgsn.dev>2021-09-09 17:50:09 -0700
committerLeo Famulari <leo@famulari.name>2021-09-09 21:34:50 -0400
commitf161f111e0692da4103196a351081a6396f3834a (patch)
treef21873d146ac347b460b524b2762288152c70147 /gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch
parent4e1adbc3b0b6694785476f4f01fbd8004fdfb5a3 (diff)
downloadguix-patches-f161f111e0692da4103196a351081a6396f3834a.tar
guix-patches-f161f111e0692da4103196a351081a6396f3834a.tar.gz
gnu: go-github-com-urfave-cli: Fix tests when building with Go 1.17.
* gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/golang.scm (go-github-com-urfave-cli)[origin]: Apply it. Signed-off-by: Leo Famulari <leo@famulari.name>
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 0000000000..7408d4ec16
--- /dev/null
+++ b/gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch
@@ -0,0 +1,28 @@
+Backported from upstream PR: https://github.com/urfave/cli/pull/1299
+---
+diff --git a/app_test.go b/app_test.go
+index 33024ff..6b3aaa3 100644
+--- a/app_test.go
++++ b/app_test.go
+@@ -513,18 +513,18 @@ func TestApp_RunAsSubcommandParseFlags(t *testing.T) {
+ func TestApp_RunAsSubCommandIncorrectUsage(t *testing.T) {
+ a := App{
+ Flags: []Flag{
+- StringFlag{Name: "--foo"},
++ StringFlag{Name: "foo"},
+ },
+ Writer: bytes.NewBufferString(""),
+ }
+
+ set := flag.NewFlagSet("", flag.ContinueOnError)
+- _ = set.Parse([]string{"", "---foo"})
++ _ = set.Parse([]string{"", "-bar"})
+ c := &Context{flagSet: set}
+
+ err := a.RunAsSubcommand(c)
+
+- expect(t, err, errors.New("bad flag syntax: ---foo"))
++ expect(t, err.Error(), "flag provided but not defined: -bar")
+ }
+
+ func TestApp_CommandWithFlagBeforeTerminator(t *testing.T) {