unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Sarah Morgensen <iskarian@mgsn.dev>
To: 50495@debbugs.gnu.org
Subject: [bug#50495] [PATCH 3/4] gnu: go-github-com-urfave-cli: Fix tests with go@1.17.
Date: Thu,  9 Sep 2021 17:50:09 -0700	[thread overview]
Message-ID: <c67651f0bd73c067755961f17558f37b8186565e.1631234078.git.iskarian@mgsn.dev> (raw)
In-Reply-To: <cover.1631234078.git.iskarian@mgsn.dev>

* 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.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/golang.scm                       |  3 +-
 .../go-github-com-urfave-cli-fix-tests.patch  | 28 +++++++++++++++++++
 3 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 2a56c4a9e2..bd6e2e79d0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1184,6 +1184,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gobject-introspection-cc.patch		\
   %D%/packages/patches/gobject-introspection-girepository.patch	\
   %D%/packages/patches/go-fix-script-tests.patch			\
+  %D%/packages/patches/go-github-com-urfave-cli-fix-tests.patch \
   %D%/packages/patches/go-skip-gc-test.patch			\
   %D%/packages/patches/gpm-glibc-2.26.patch			\
   %D%/packages/patches/gpodder-disable-updater.patch		\
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index b08796e22a..2d0bbdb30d 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -4976,7 +4976,8 @@ (define-public go-github-com-urfave-cli
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "10mcnvi5qmn00vpyk6si8gjka7p654wr9hac4zc9w5h3ickhvbdc"))))
+         "10mcnvi5qmn00vpyk6si8gjka7p654wr9hac4zc9w5h3ickhvbdc"))
+       (patches (search-patches "go-github-com-urfave-cli-fix-tests.patch"))))
     (build-system go-build-system)
     (arguments
      '(#:import-path "github.com/urfave/cli"))
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) {
-- 
2.33.0





  parent reply	other threads:[~2021-09-10  0:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10  0:47 [bug#50495] [PATCH 0/4] gnu: Fix some builds with go@1.17 Sarah Morgensen
2021-09-10  0:50 ` [bug#50495] [PATCH 1/4] gnu: go-github-com-keybase-go-ps: Patch for go@1.17 Sarah Morgensen
2021-09-10  0:50 ` [bug#50495] [PATCH 2/4] gnu: go-github-com-sevlyar-go-daemon: Fix tests " Sarah Morgensen
2021-09-10  0:50 ` Sarah Morgensen [this message]
2021-09-10  0:50 ` [bug#50495] [PATCH 4/4] gnu: go-github-com-urfave-cli-v2: Fix tests with go@1.17 Sarah Morgensen
2021-09-10  1:41 ` [bug#50495] [PATCH 0/4] gnu: Fix some builds " Leo Famulari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c67651f0bd73c067755961f17558f37b8186565e.1631234078.git.iskarian@mgsn.dev \
    --to=iskarian@mgsn.dev \
    --cc=50495@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).