diff options
Diffstat (limited to 'tests/misc/split-fail')
-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 b0b22e4c4..cf0edc900 100755 --- a/tests/misc/split-fail +++ b/tests/misc/split-fail @@ -27,6 +27,10 @@ split -a 0 in 2> /dev/null || fail=1 split -b 0 in 2> /dev/null && fail=1 split -C 0 in 2> /dev/null && fail=1 split -l 0 in 2> /dev/null && fail=1 +split -n 0 in 2> /dev/null && fail=1 +split -n 1/0 in 2> /dev/null && fail=1 +split -n 0/1 in 2> /dev/null && fail=1 +split -n 2/1 in 2> /dev/null && fail=1 # Make sure -C doesn't create empty files. rm -f x?? || fail=1 @@ -44,6 +48,12 @@ split --lines=$UINTMAX_MAX in || fail=1 split --bytes=$OFF_T_MAX in || fail=1 split --line-bytes=$OFF_T_OFLOW 2> /dev/null in && fail=1 split --line-bytes=$SIZE_OFLOW 2> /dev/null in && fail=1 +if truncate -s$SIZE_OFLOW large; then + # Ensure we can split chunks of a large file on 32 bit hosts + split --number=$SIZE_OFLOW/$SIZE_OFLOW large >/dev/null || fail=1 +fi +split --number=r/$UINTMAX_MAX/$UINTMAX_MAX </dev/null >/dev/null || fail=1 +split --number=r/$UINTMAX_OFLOW </dev/null 2>/dev/null && fail=1 # Make sure that a huge obsolete option evokes the right failure. split -99999999999999999991 2> out && fail=1 |