mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-20 18:56:39 +02:00
split: support split -n on larger pipe input
* bootstrap.conf (gnulib_modules): Add free-posix, tmpfile. * src/split.c (copy_to_tmpfile): New function. (input_file_size): Use it to split larger files when sizes cannot easily be determined via fstat or lseek. See Bug#61386#235. * tests/split/l-chunk.sh: Mark tests of /dev/zero as very expensive since they exhaust /tmp.
This commit is contained in:
@@ -37,12 +37,15 @@ rm x??
|
||||
|
||||
# 'split' should reject any attempt to create an infinitely
|
||||
# long output file.
|
||||
returns_ 1 split -n l/2 /dev/zero || fail=1
|
||||
rm x??
|
||||
# This test is very expensive as it runs out of /tmp space.
|
||||
if test "${RUN_VERY_EXPENSIVE_TESTS+set}" = set; then
|
||||
returns_ 1 split -n l/2 /dev/zero || fail=1
|
||||
rm x??
|
||||
|
||||
# Repeat the above, but with 1/2, not l/2:
|
||||
returns_ 1 split -n 1/2 /dev/zero || fail=1
|
||||
rm x??
|
||||
# Repeat the above, but with 1/2, not l/2:
|
||||
returns_ 1 split -n 1/2 /dev/zero || fail=1
|
||||
rm x??
|
||||
fi
|
||||
|
||||
# Ensure --elide-empty-files is honored
|
||||
split -e -n l/10 /dev/null || fail=1
|
||||
|
||||
Reference in New Issue
Block a user