diff options
author | Jim Meyering <jim@meyering.net> | 2003-04-09 14:57:32 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-04-09 14:57:32 +0000 |
commit | c3e1712629f8cadb2ab937dfffbe249b60b173cd (patch) | |
tree | 07a77c213f6fe3ae02c205b2f2813c29ee60a340 /tests/misc | |
parent | 934c4134ce7c7d52398c3daf6cf2abcd56ede41c (diff) | |
download | coreutils-c3e1712629f8cadb2ab937dfffbe249b60b173cd.tar.xz |
Ensure that split --lines=N and --bytes=N work for N=2^32.
Currently (coreutils-5.0.1) split --line-bytes=M fails
with `invalid number of bytes' for M=2^32 or larger. Test it.
Diffstat (limited to 'tests/misc')
-rwxr-xr-x | tests/misc/split-fail | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/misc/split-fail b/tests/misc/split-fail index 2e3b77fb5..3b50234b0 100755 --- a/tests/misc/split-fail +++ b/tests/misc/split-fail @@ -34,4 +34,14 @@ env -u _POSIX2_VERSION split -1 in 2> /dev/null || fail=1 # Then make sure that -0 evokes a failure. env -u _POSIX2_VERSION split -0 in 2> /dev/null && fail=1 +# Ensure that split --lines=N and --bytes=N work for N=2^32. +_4gb=4294967296 +split --lines=$_4gb in || fail=1 +split --bytes=$_4gb in || fail=1 + +# Currently (coreutils-5.0.1) split --line-bytes=M fails +# with `invalid number of bytes' for M=2^32 or larger. Test it. +# Of course, this is an artificial limit and should be fixed. +split --line-bytes=$_4gb 2> /dev/null in && fail=1 + (exit $fail); exit $fail |