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) { active' href='/guix/log/m4?showmsg=1'>logtreecommitdiff
path: root/m4
AgeCommit message (Collapse)Author
2021-03-23Add powerpc64le-linux as a supported Guix architecture.Chris Marusich
This makes powerpc64le-linux a supported architecture for Guix, but not for Guix System. * Makefile.am (SUPPORTED_SYSTEMS): Add an entry for powerpc64le-linux. * etc/guix-install.sh (chk_sys_arch): Same. * guix/packages.scm (%supported-systems): Same. * m4/guix.m4 (GUIX_ASSERT_SUPPORTED_SYSTEM): Same. * tests/guix-build.sh (all_systems): Same.
2021-03-17maint: Check whether Guile-zlib is recent enough.Ludovic Courtès
This is a followup to a04aef2430645357d7796969d4b6453478ff8a3f. * m4/guix.m4 (GUIX_CHECK_GUILE_ZLIB): New macro. * configure.ac: Use it when checking for Guile-zlib.
2021-02-04build: Add '--with-channel-commit' and related configure flags.Ludovic Courtès
Partially fixes <https://bugs.gnu.org/45896>. * m4/guix.m4 (GUIX_CHANNEL_METADATA): New macro. * configure.ac: Use it. * guix/config.scm.in (%channel-metadata): Adjust accordingly.
2020-12-11maint: Avoid macros obsolete in Autoconf 2.70.Ludovic Courtès
* configure.ac: Require Autoconf 2.69. Use 'AS_HELP_STRING' instead of 'AC_HELP_STRING'. * m4/guix.m4: Likewise. * config-daemon.ac: Use 'AC_CONFIG_HEADERS' instead of the singular variant.
2020-10-22git: Require Guile-Git 0.3.0 or later.Ludovic Courtès
* guix/git.scm (auth-supported?): Remove. (clone*): Inline code that was dependent on AUTH-SUPPORTED?. (update-cached-checkout): Likewise. (resolve-reference): Remove check for 'object-lookup-prefix' and use it unconditionally. (load-git-submodules): Remove. (update-submodules): Use 'repository-submodules', 'submodule-lookup', etc. unconditionally. (update-cached-checkout): Use 'repository-close!' unconditionally. * m4/guix.m4 (GUIX_CHECK_GUILE_GIT): New macro. * configure.ac: Use it and error out when it fails. * doc/guix.texi (Requirements): Bump to Guile-Git 0.3.0.