Commit Graph
20 Commits
Author SHA1 Message Date
Joao Matos 394427e691 tests: csplit: add a test for the fix in the previous commit
* tests/csplit/guard-input.sh: New file.
* tests/local.mk (all_tests): Add the new test.
2026-11-12 22:42:06 -08:00
Sylvestre Ledru d7e639418a tests: csplit: ensure -z removes only empty files it created
Reported at https://github.com/uutils/coreutils/issues/16068

* tests/csplit/csplit.sh: Add test cases.

Link: https://github.com/coreutils/coreutils/pull/444
2026-11-07 12:35:10 +00:00
Sylvestre Ledru 501d843fdb tests: csplit: check a suppressed line number one past the end
* tests/csplit/csplit-suppress-matched.pl (@csplit_tests): Add test
cases where --suppress-matched gets a line number one past the end
of input, alone, repeated, and after its previous line was already
suppressed.
https://github.com/uutils/coreutils/pull/15637

Link: https://github.com/coreutils/coreutils/pull/394
2026-10-24 16:15:03 +01:00
Sylvestre Ledru 7b970665d8 tests: csplit: cover the trailing empty split
csplit always creates the split holding the remainder of the input,
even when the patterns have already consumed everything and that
split is therefore empty.  Two ways of reaching that state were not
exercised: a regexp with an offset that lands past the last line,
and --suppress-matched with a mix of a line number and a regexp
matching the last line.  Only the all-line-numbers case was covered.
identified here: https://github.com/uutils/coreutils/pull/14565

* tests/csplit/csplit.sh: Test an offset reaching past end of input,
with and without -z.
* tests/csplit/csplit-suppress-matched.pl (mixed-1, mixed-2): Test a
line number combined with a regexp matching the last line.

Link: https://github.com/coreutils/coreutils/pull/353
2026-09-15 13:09:29 +01:00
Collin Funk f188b3cc19 tests: csplit: test the behavior with an empty pattern
* tests/csplit/csplit.sh: Add a test case.
2026-08-31 17:31:08 -07:00
Collin Funk 4c234d7555 tests: csplit: avoid a false failure on NetBSD
* tests/csplit/csplit.sh: Don't run the test if calling read on a
directory file descriptor works.
Reported by Bruno Haible.
2026-06-30 20:04:10 -07:00
Collin Funk d7622d8629 tests: csplit: also test a read failure without -k
* tests/csplit/csplit.sh: Adjust the test case added by the previous
commit to also run without the -k option.
2026-06-27 16:14:34 -07:00
Collin Funk cd381f4afd tests: csplit: check for message to standard output after read fails
* tests/csplit/csplit.sh: Add a test case.
2026-06-27 12:48:19 -07:00
Pádraig Brady 448a7dc072 maint: tests: avoid ENOSPC specific handling
* tests/csplit/csplit-io-err.sh: Adjust determination of ENOSPC.
* tests/csplit/split-io-err.sh: Likewise.
* tests/fold/fold-zero-width.sh: Verify full ENOSPC message.
* tests/tac/tac-continue.sh: Likewise.
* tests/misc/io-errors.sh: Likewise.
* tests/misc/write-errors.sh: Likewise.
2026-02-18 18:31:49 +00:00
Collin Funk 73d3a49f45 maint: run 'make update-copyright' 2026-01-01 10:56:16 -08:00
oech3 6a2a781efd tests: extend csplit-io-err.sh for directory
* tests/csplit/csplit-io-err.sh: Add a test case
to ensure a directory is _not_ replaced.
2026-01-01 11:50:07 +00:00
oech3 1b467784fb tests: consolidate csplit-io-err tests
* tests/csplit/csplit-io-err.sh: Replace this LD_PRELOAD test with...
* tests/csplit/csplit-io-err-2.sh: This more general test,
that leverages /dev/full.
* tests/local.mk: Remove tests/csplit/csplit-io-err-2.sh.
2025-12-27 12:48:57 +00:00
oech3 60f48bbda6 tests: csplit: check writing to /dev/full
* tests/csplit/csplit-io-err-2.sh: Add a new test.
* tests/local.mk: Reference new test.
2025-12-26 14:59:39 +00:00
Pádraig Brady 9ccabd8df3 tests: adjust csplit VM limit for CheriBSD
* tests/misc/csplit-heap.sh: More memory is required to avoid
a false failure on CheriBSD with its heap accounting overhead.
This is confirmed to still trigger with the original memory leak
being tested.
2025-04-08 16:07:06 +01:00
Pádraig Brady 8482cb9451 csplit: avoid extraenous output files given empty input
* src/csplit.c (get_first_line_in_buffer): Don't exit here
upon empty input, rather indicate no input in the return
to let callers handle in a more consistent fashion.
* NEWS: Mention the bug fix.
* tests/csplit/csplit.sh: Add a test case.
Reported by Daniel Hofstetter.
2025-01-10 14:46:48 +00: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
Pádraig Brady aa50ea55ea tests: make ulimit -v interact better with ASAN
ulimit -v is generally not supported with ASAN, giving errors like:
  "ReserveShadowMemoryRange failed while trying to map 0x... bytes.
   Perhaps you're using ulimit -v"

* tests/cp/link-heap.sh: Mention ASAN as a possible reason for skipping.
* tests/csplit/csplit-heap.sh: Likewise.
* tests/cut/cut-huge-range.sh: Likewise.
* tests/dd/no-allocate.sh: Likewise.
* tests/printf/printf-surprise.sh: Likewise.
* tests/rm/many-dir-entries-vs-OOM.sh: Likewise.
* tests/head/head-c.sh: Only skip the part of the test needing ulimit.
* tests/split/line-bytes.sh: Likewise.
2024-01-17 23:59:49 +00: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
Paul Eggert 2dddc87214 maint: spelling fixes, including author names
Most of this just affects commentary and documentations.  The only
significant behavior change is translating author names via
proper_name_lite rather than proper_name_utf8, or not translating
them at all.  proper_name_lite is good enough for coreutils and
avoids the bloat that had coreutils not using Gnulib proper_name.
* bootstrap.conf (gnulib_modules): Use propername-lite instead
of propername.
(XGETTEXT_OPTIONS): Look for proper_name_lite instead of for
proper_name_utf8.
* cfg.mk (local-checks-to-skip): Remove
sc_proper_name_utf8_requires_ICONV, since we no longer use
proper_name_utf8.
(old_NEWS_hash): Update.
(sc_check-I18N-AUTHORS): Remove; no longer needed.
2023-08-28 14:06:43 -07: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