From upstream PR: https://github.com/urfave/cli/pull/1299 From: William Wilson Date: Tue, 31 Aug 2021 14:19:17 -0500 Subject: Make test case compatible with Go 1.17 As of Go 1.17, the go flag package will panic if given a syntactically invalid flag. This causes TestApp_RunAsSubCommandIncorrectUsage to panic and therefore fail. See https://golang.org/doc/go1.17#flag for more information. --- diff --git a/app_test.go b/app_test.go index 7c38f6048..76e211d68 100644 --- a/app_test.go +++ b/app_test.go @@ -476,18 +476,18 @@ func TestApp_RunAsSubCommandIncorrectUsage(t *testing.T) { a := App{ Name: "cmd", 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) { ive' href='/guix/log/gnu/packages/libunistring.scm'>logtreecommitdiff
path: root/gnu/packages/libunistring.scm
AgeCommit message (Expand)Author
2023-07-20Revert "gnu: libunistring: Fix make check for the Hurd."...This reverts commit 12e6a5923812abf180f03bea9e07dd99244a3fcd, which used XFAIL_TESTS to have 'make check' pass with failing tests "test-perror2" "test-strerror_r" that now pass with glibc-2.37 and libc-for-target in commencement. Janneke Nieuwenhuizen
2023-05-31gnu: libunistring: Fix make check for the Hurd....* gnu/packages/libunistring.scm (libunistring)[arguments]: Set XFAIL_TESTS with test-perror2, and test-strerror_r when building to the Hurd. Janneke Nieuwenhuizen
2022-05-28gnu: libunistring: Rewrite using gexps....* gnu/packages/libunistring.scm (libunistring)[arguments]: Rewrite using gexps. Remove trailing #t. Efraim Flashner
2022-05-28gnu: libunistring: Update to 1.0....* gnu/packages/libunistring.scm (libunistring): Update to 1.0. [license]: Update in accordance with upstream. Efraim Flashner