unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 7408d4ec1687c5604864d773b6b6fa45e8f26141 835 bytes (raw)
name: gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch 	 # note: path name is non-authoritative(*)

 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
 
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) {

debug log:

solving 7408d4ec16 ...
found 7408d4ec16 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

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).