Commit Graph
10 Commits
Author SHA1 Message Date
Pádraig Brady 2a078e45fa tests: printf: avoid false failure with dash
* tests/printf/printf.sh: Use printf rather than echo,
as echo unconditionally interprets backslashes in dash.
2026-10-30 14:50:17 +00:00
Collin Funk 9e804edddb printf: quote the ignored characters in the warning
* src/printf.c (STRTOX): Add a call to quote when printing the ignored
characters.
* tests/printf/printf.sh: Adjust an existing test case. Add another
quoting test case.

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-I9I24ON7.
2026-10-27 18:16:03 -07:00
Iván Ezequiel Rodriguez 49596f93d2 tests: printf: cover %a via round-trip processing
* tests/printf/printf.sh: Exercise %a without depending on a
particular hex form by round-tripping through %.10f.
Also check the 0x/0X prefix.
Suggested by Pádraig Brady.
2026-09-28 21:37:36 +01:00
Pádraig Brady 5408133505 tests: printf: remove redunant check
* tests/printf/printf.sh: We're checking .70000,
so no point also checkint .1000
2026-08-14 18:15:50 +01:00
Sylvestre Ledru 47f57665d5 tests: printf,seq: add checks for large field widths and precisions
* tests/printf/printf.sh: Ensure a large field width or precision
produces fully padded output, and that a precision beyond 1000
digits is not truncated.
* tests/seq/seq-precision.sh: Ensure a large format precision is
fully honored.

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

Link: https://github.com/coreutils/coreutils/pull/325
2026-08-12 13:25:00 +01:00
Collin Funk 73d3a49f45 maint: run 'make update-copyright' 2026-01-01 10:56:16 -08:00
Pádraig Brady 28b176085f maint: update all copyright year number ranges
Update to latest gnulib with new copyright year.
Run "make update-copyright" and then...

* gnulib: Update included in this commit as copyright years
are the only change from the previous gnulib commit.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
* tests/sample-test: Adjust to use the single most recent year.
2025-01-01 09:33:08 +00:00
Paul Eggert 91e95f1f86 printf: diagnose empty args correctly
Also, port better to macOS.
* src/printf.c (verify_numeric): Don’t assume that when s == end
then errno is zero; it is EINVAL on macOS, and POSIX allows this.
(print_direc): Treat missing arg as zero for numeric conversions,
and as an empty string for the others.
(print_formatted): Use null pointer, not an empty string,
to represent missing arg.
* tests/printf/printf.sh: Test empty and space widths and precisions.
2024-11-19 08:41:34 -08:00
Pádraig Brady a966dcdb69 maint: update all copyright year number ranges
Update to latest gnulib with new copyright year.
Run "make update-copyright" and then...

* gnulib: Update included in this commit as copyright years
are the only change from the previous gnulib commit.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Manually update copyright year,
until we fully sync with gnulib at a later stage.
* tests/sample-test: Adjust to use the single most recent year.
2024-01-01 13:27:23 +00:00
Sylvestre Ledru 15925d0e5b tests: move tests to a directory per utility
* cfg.mk: Adjust syntax check exclusion paths.
* tests/local.mk: Adjust for renamed tests.
2023-06-19 13:12:37 +01:00