]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: numfmt: check --header does not swallow a following operand
authorSylvestre Ledru <sylvestre@debian.org>
Sun, 5 Jul 2026 18:40:00 +0000 (20:40 +0200)
committerPádraig Brady <P@draigBrady.com>
Mon, 6 Jul 2026 13:25:59 +0000 (14:25 +0100)
* tests/numfmt/numfmt.pl (header-10): New test verifying that --header,
which only accepts an argument via '=', does not consume a following
operand as its value.
https://github.com/uutils/coreutils/pull/13273

Link: https://github.com/coreutils/coreutils/pull/312
tests/numfmt/numfmt.pl

index 1c64319e40d9f21652727ff7c74d2d4f49e5f760..827d5ea3f6852b5f06fe55dc290bbe0d24d31e44 100755 (executable)
@@ -507,6 +507,11 @@ my @Tests =
              {IN_PIPE=>"hello\nworld\n"},
              {OUT=>"hello\nworld"}],
 
+     # --header takes an argument only via '=': a following operand
+     # must not be swallowed as the option's value.
+     ['header-10', '--header 7 8',
+             {OUT=>"7\n8"}],
+
 
      ## human_strtod testing