[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests: csplit: also test a read failure without -k
|
From: |
Collin Funk |
|
Subject: |
[PATCH] tests: csplit: also test a read failure without -k |
|
Date: |
Sat, 27 Jun 2026 18:20:18 -0700 |
* tests/csplit/csplit.sh: Adjust the test case added by the previous
commit to also run without the -k option.
---
tests/csplit/csplit.sh | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/tests/csplit/csplit.sh b/tests/csplit/csplit.sh
index 5cb180dd1..cb1deb158 100755
--- a/tests/csplit/csplit.sh
+++ b/tests/csplit/csplit.sh
@@ -111,14 +111,16 @@ 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
+for opt in '' '-k'; do
+ rm -f xx?? || framework_failure_
+ returns_ 1 csplit $opt . '/^a/' >out 2>err || fail=1
+ compare /dev/null xx00 || fail=1
+ compare exp-out out || fail=1
+ compare exp-err err || fail=1
+done
Exit $fail
--
2.54.0
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] tests: csplit: also test a read failure without -k,
Collin Funk <=