summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2011-05-25 13:05:37 +0100
committerPádraig Brady <P@draigBrady.com>2011-05-25 23:04:58 +0100
commitd92849fe5a9c8a24203f70b02806737666cb980b (patch)
tree3a90141f81ee5ff12a87854bb8256b00e4d5e010 /tests/misc
parente89c998a9ecbe0a1b29d7e6c97531d5069877087 (diff)
downloadcoreutils-d92849fe5a9c8a24203f70b02806737666cb980b.tar.xz
split: fix an edge case where -n l/... creates an extra file
* src/split.c (lines_bytes_chunk): Handle the edge case where the file is truncated as we read. * tests/misc/split-lchunk: Cleanup; no functional change.
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/split-lchunk4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/misc/split-lchunk b/tests/misc/split-lchunk
index 762138b97..8b4d157a1 100755
--- a/tests/misc/split-lchunk
+++ b/tests/misc/split-lchunk
@@ -74,8 +74,8 @@ for ELIDE_EMPTY in '' '-e'; do
rm -f x*
if test -z "$ELIDE_EMPTY"; then
- split ---io-blksize=$IO_BLKSIZE $ELIDE_EMPTY -n l/2/$N in > chunk.k
- stat x* >/dev/null 2>/dev/null && fail=1
+ split ---io-blksize=$IO_BLKSIZE -n l/2/$N in > chunk.k
+ stat x* 2>/dev/null && fail=1
fi
split ---io-blksize=$IO_BLKSIZE $ELIDE_EMPTY -n l/$N in