* tests/csplit/csplit.sh: Add a test case. --- tests/csplit/csplit.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/tests/csplit/csplit.sh b/tests/csplit/csplit.sh index 44189138f..2356b4323 100755 --- a/tests/csplit/csplit.sh +++ b/tests/csplit/csplit.sh @@ -110,6 +110,19 @@ csplit: '1': line number out of range EOF compare experr err || fail=1 +# Test the behavior of an empty pattern. +rm -f xx?? || framework_failure_ +echo a >inp || framework_failure_ +cat <<\EOF >exp || framework_failure_ +0 +2 +EOF +csplit inp '//' >out 2>err || fail=1 +compare /dev/null err || fail=1 +compare exp out || fail=1 +compare /dev/null xx00 || fail=1 +compare inp xx01 || fail=1 + # Test that the message to standard output isn't elided after read fails. if ! cat . >/dev/null 2>&1; then echo 0 >exp-out || framework_failure_ -- 2.55.0
