From d65f4ef0a8b93fef37505855cbac32533202cca2 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 1 May 2026 23:21:27 +0200 Subject: [PATCH] tests: patch GNU numfmt 'neg-arg-not-option' to accept clap-style error --- util/gnu-patches/tests_numfmt.patch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/util/gnu-patches/tests_numfmt.patch b/util/gnu-patches/tests_numfmt.patch index ac7870e34a3..af0a424c82d 100644 --- a/util/gnu-patches/tests_numfmt.patch +++ b/util/gnu-patches/tests_numfmt.patch @@ -118,7 +118,16 @@ Index: gnu/tests/numfmt/numfmt.pl {EXIT=>1}], ## Format string - check error detection -@@ -1097,7 +1106,7 @@ my @Limit_Tests = +@@ -894,7 +903,7 @@ my @Tests = + # A leading '-9...' must be treated as an invalid short option, not as + # a negative positional argument. + ['neg-arg-not-option', '--to=iec -9923868', +- {ERR_SUBST => q!s/'9'/9/;s/unknown/invalid/!}, ++ {ERR_SUBST => q!s/^error: unexpected argument '?-(\d).*$/numfmt: invalid option -- $1/; s/^For more information, try '--help'\.$/Try 'numfmt --help' for more information./; $_ = "" if /^\s*$|^ tip:|^Usage:/!}, + {ERR => "$prog: invalid option -- 9\n" . + "Try '$prog --help' for more information.\n"}, + {EXIT => 1}], +@@ -1136,7 +1145,7 @@ my @Limit_Tests = {EXIT => 2}], ); # Restrict these tests to systems with LDBL_DIG == 18