From: Collin Funk Date: Sat, 27 Jun 2026 19:48:19 +0000 (-0700) Subject: tests: csplit: check for message to standard output after read fails X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cd381f4afd17c2927ce34bd0f0d6a1b56c9700d3;p=thirdparty%2Fcoreutils.git tests: csplit: check for message to standard output after read fails * tests/csplit/csplit.sh: Add a test case. --- diff --git a/tests/csplit/csplit.sh b/tests/csplit/csplit.sh index b3865b7064..5cb180dd15 100755 --- a/tests/csplit/csplit.sh +++ b/tests/csplit/csplit.sh @@ -110,4 +110,15 @@ csplit: '1': line number out of range EOF compare experr err || fail=1 +# Test that the message to standard output isn't elided after read fails. +rm -f xx?? || framework_failure_ +echo 0 >exp-out || framework_failure_ +cat <<\EOF >exp-err || framework_failure_ +csplit: read error: Is a directory +EOF +returns_ 1 csplit -k . '/^a/' >out 2>err || fail=1 +compare /dev/null xx00 || fail=1 +compare exp-out out || fail=1 +compare exp-err err || fail=1 + Exit $fail