summaryrefslogtreecommitdiff
path: root/tests/misc/csplit
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc/csplit')
-rwxr-xr-xtests/misc/csplit8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/misc/csplit b/tests/misc/csplit
index b0cb1faae..2d04fee7f 100755
--- a/tests/misc/csplit
+++ b/tests/misc/csplit
@@ -36,6 +36,14 @@ cmp out exp || fail=1
test $fail = 1 && diff out exp 2> /dev/null
rm -f in out exp
+# Ensure that xx02 contains just two newlines.
+# This would fail due to reading from freed buffer with coreutils-5.0.91.
+printf '\n\n' > exp
+cp xx02 out || fail=1
+cmp out exp || fail=1
+test $fail = 1 && diff out exp 2> /dev/null
+rm -f in out exp
+
# csplit would infloop
(echo; echo a) > in
csplit in '/a/-1' '{*}' > out || fail=1