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
This commit is contained in:
Sylvestre Ledru authored and Pádraig Brady committed 2026-11-07 12:35:10 +00:00
1 parent 5d793a1521
commit d004eacceb
1 file changed
+3
+3
View File
@@ -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"}],