From d004eacceba7e0bd286ba773fc52024c4b4cd56e Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 29 Oct 2026 21:30:39 +0100 Subject: [PATCH] tests: numfmt: ensure unambiguous abbreviations of option values work Reported at https://github.com/uutils/coreutils/issues/16005 * tests/numfmt/numfmt.pl: Add test cases. Link: https://github.com/coreutils/coreutils/pull/427 --- tests/numfmt/numfmt.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/numfmt/numfmt.pl b/tests/numfmt/numfmt.pl index 515f5df41..100e652bf 100755 --- a/tests/numfmt/numfmt.pl +++ b/tests/numfmt/numfmt.pl @@ -42,6 +42,9 @@ my @Tests = ['5', '--from=auto 1Ki', {OUT => "1024"}], ['5.1', '--from=iec-i 1Ki', {OUT => "1024"}], ['5.2', '--from=iec-i 1', {OUT => "1"}], + # Unambiguous abbreviations of option values are accepted. + ['abbrev-from', '--from=a 5', {OUT => "5"}], + ['abbrev-invalid', '--invalid=a 5', {OUT => "5"}], ['6', {IN_PIPE => "1234\n"}, {OUT => "1234"}], ['6nul', {IN_PIPE => "1234\000foo bar\n"},{OUT => "1234"}],