Commit Graph
10 Commits
Author SHA1 Message Date
Sylvestre Ledru a1751bc276 tests: expand: check the column is kept across files and buffers
* tests/expand/expand.pl (f4, f5): New tests, for a line that
continues into the next file.
(long-1, long-2): New tests, for a line longer than a read buffer.

https://github.com/uutils/coreutils/pull/16346

Link: https://github.com/coreutils/coreutils/pull/467
2026-11-15 16:17:39 +00:00
Sylvestre Ledru 9233e94688 tests: expand, unexpand: ensure a bare '-' is treated as standard input
Reported at https://github.com/uutils/coreutils/issues/15658

* tests/expand/expand.pl: Add test case.
* tests/unexpand/unexpand.pl: Add test cases.

Link: https://github.com/coreutils/coreutils/pull/416
2026-11-07 12:35:10 +00:00
Collin Funk 98c8b158b6 tests: make checks for $LOCALE_FR and $LOCALE_FR_UTF8 consistent
* tests/cp/non-utf8-name.sh: Check for $LOCALE_FR and $LOCALE_FR_UTF8
being empty or the string "none".
* tests/date/percent-percent.sh: Likewise.
* tests/du/block-size.sh (test_unit): Likewise.
* tests/ls/non-utf8-hidden.sh: Likewise.
* tests/mktemp/bad-unicode.sh: Likewise.
* tests/sort/sort-unique.sh: Likewise.
* tests/df/problematic-chars.sh:  Check for $LOCALE_FR_UTF8 being empty
or the string "none".
* tests/expand/mb.sh: Likewise.
* tests/fold/fold-characters.sh: Likewise.
* tests/fold/fold-nbsp.sh: Likewise.
* tests/fold/fold-spaces.sh: Likewise.
* tests/fold/fold-zero-width.sh: Likewise.
* tests/join/join-utf8.sh: Likewise.
* tests/misc/sleep.sh: Likewise.
* tests/nl/multibyte.sh: Likewise.
* tests/paste/multi-byte.sh: Likewise.
* tests/printf/printf-mb.sh: Likewise.
* tests/printf/printf-quote.sh: Likewise.
* tests/sort/sort-debug-keys.sh: Likewise.
* tests/unexpand/mb.sh: Likewise.
2026-10-04 15:31:59 -07:00
Sylvestre Ledru 6127da8050 tests: expand, unexpand: check blank-separated tab lists
parse_tab_stops accepts a comma or any blank as a separator, but the
tests only ever used a comma or a space, so a tab separator was
untested.  unexpand had no coverage of multi-stop lists at all.
Missing case identified here:
https://github.com/uutils/coreutils/pull/14057

* tests/expand/expand.pl (t4a): New test, using tabs as separators.
* tests/unexpand/unexpand.pl (tabs-3, tabs-4, tabs-5, tabs-6): New
tests, for comma-, space- and tab-separated lists and for a leading
separator.

Link: https://github.com/coreutils/coreutils/pull/332
2026-08-26 12:11:19 +01:00
Pádraig Brady d58ea74d01 tests: avoid $SHELL -c "ulimit ..." pattern
As described in commit v9.10-283-g5cb0cca3b
avoid using ulimit with $SHELL -c, and explict
invocation of the shell like that can require lots of memory,
often due to loading the locale archive.
* tests/basenc/bounded-memory.sh: Avoid $SHELL -c with ulimit.
* tests/cut/bounded-memory.sh: Likewise.
* tests/expand/bounded-memory.sh Likewise.
* tests/pr/bounded-memory.sh Likewise.
* tests/unexpand/bounded-memory.sh Likewise.
* tests/fold/fold-zero-width.sh: Bring the ulimit bound
down to the standard 6M over the determined limit.
2026-04-15 15:08:27 +01:00
Pádraig Brady a4cf72f5a7 tests: expand: fix false failure on various systems
* tests/expand/mb.sh: Use $LOCALE_FR_UTF8 rather than
hardcoding "en_US.UTF-8".
* tests/unexpand/mb.sh: Likewise.
Reported by Bruno Haible.
2026-03-09 21:08:40 +00:00
Lukáš Zaoral 2b92c16d26 expand,unexpand: support multi-byte input
* src/expand.c: Use mbbuf to support multi-byte input.
* src/unexpand.c: Likewise.
* tests/expand/mb.sh: New multi-byte test.
* tests/unexpand/mb.sh: Likewise.
* tests/local.mk: Reference new tests.
* NEWS: Mention the improvement.
2026-03-07 12:39:37 +00:00
Collin Funk 73d3a49f45 maint: run 'make update-copyright' 2026-01-01 10:56:16 -08:00
Collin Funk bc1d66f8a5 maint: organize expand and unexpand tests in a subdirectory
* tests/misc/expand.pl: Move to tests/expand/expand.pl.
* tests/misc/unexpand.pl: Move to tests/unexpand/unexpand.pl.
* tests/local.mk (all_tests): Adjust file names.
2025-12-02 21:32:07 -08:00
Collin Funk 649be7359e tests: expand, unexpand: add a test for bounded memory operation
* tests/expand/bounded-memory.sh: New file.
* tests/unexpand/bounded-memory.sh: New file.
* tests/local.mk (all_tests): Add the tests.
2025-12-02 21:25:37 -08:00