Commit Graph
12 Commits
Author SHA1 Message Date
Sylvestre Ledru d004eacceb 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
2026-11-07 12:35:10 +00:00
Sylvestre Ledru b67fe9d035 tests: numfmt: check the first blank between fields is a space
* tests/numfmt/numfmt.pl (@Tests): Add test cases for tabs and
multiple blanks between fields, including echoed invalid lines
and an explicit delimiter.
https://github.com/uutils/coreutils/pull/15555

Link: https://github.com/coreutils/coreutils/pull/390
2026-10-24 16:15:03 +01:00
Pádraig Brady 64185b8cb2 tests: numfmt: ensure correct output on Solaris
* tests/numfmt/numfmt.pl: Add a test case for "%.5119f".
* NEWS: Mention the bug fix.
2026-08-14 17:47:37 +01:00
Sylvestre Ledru 48c4c15e4e tests: numfmt: add checks for overflowing unit sizes
* tests/numfmt/numfmt.pl (@Tests): Add unit-11 and unit-12, ensuring
a --to-unit/--from-unit whose suffix multiplication overflows
uintmax_t is rejected with "invalid unit size" rather than
being wrapped or crashing.

Link: https://github.com/uutils/coreutils/pull/13484

Link: https://github.com/coreutils/coreutils/pull/326
2026-08-12 13:32:12 +01:00
Sylvestre Ledru 68f15d9128 tests: numfmt: check --header does not swallow a following operand
* 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
2026-07-06 14:25:59 +01:00
Pádraig Brady 1c1ccadf66 test: avoid false failure on OpenBSD
* tests/numfmt/numfmt.pl: Use standard getopt error map,
needed on OpenBSD.
Reported by Bruno Haible.
2026-04-16 21:41:40 +01:00
Pádraig Brady 5b0cb4379a tests: numfmt: avoid false failure on systems without long double
* tests/numfmt/numfmt.pl: Move recently added test that depends
on long double support to the appropriately guarded set.
Also reduce the value to be in the definitely safe long double range.
Reported by Bruno Haible.
2026-04-07 21:47:21 +01:00
Sylvestre Ledru 262bc9f49e tests: numfmt: cover GNU/uutils compatibility edge cases
* tests/numfmt/numfmt.pl: Add tests exercising corner cases around
negative-argument rejection, large integer precision, scientific
notation rejection, '--from-unit' fractional precision, zero-padded
format sign ordering, '--to-unit' prefix selection, and
'--format=%.0f' with '--to=<scale>'.
https://github.com/uutils/coreutils/pull/11668
2026-04-06 15:57:51 +01:00
Pádraig Brady f06beebd34 tests: factor,numfmt: verify embedded NUL handling
* tests/factor/factor.pl: Verify that embedded NULs
on stdin terminate the _number_.
* tests/numfmt/numfmt.p: Verify that embedded NULs
on stdin terminate the _line_.
https://github.com/coreutils/coreutils/pull/196
2026-02-25 14:52:57 +00:00
Collin Funk 73d3a49f45 maint: run 'make update-copyright' 2026-01-01 10:56:16 -08:00
Pádraig Brady 955dfdafa2 numfmt: fix dropped custom suffix when failing to parse
* src/numfmt.c (process_suffixed_number): Restore custom suffix
upon failure to parse number.
* tests/numfmt/numfmt.pl: Add test cases.
* NEWS: Mention the bug fix.
Fixes https://bugs.debian.org/1094581
2025-12-22 13:17:37 +00:00
Pádraig Brady 38b824ac7e tests: numfmt: add non-utf8 multi-byte test
* tests/numfmt/mb-non-utf8.sh: Test GB18030 delimiter search.
* tests/local.mk: Reference the new test, and move
the existing numfmt.pl test from tests/misc to tests/numfmt.
2025-10-20 13:27:33 +01:00