summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-02-21 07:12:37 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-02-21 07:12:37 +0000
commit17103c0976b65bcb5adad6611c42bfe16bbb2f3d (patch)
tree969712d4ba01941b5b2cda684d3353abda75bb3a /tests
parente0cc7364896f35339d9aae9e990e8d563b76870b (diff)
downloadcoreutils-17103c0976b65bcb5adad6611c42bfe16bbb2f3d.tar.xz
Don't assume that the current host supports integers wider than 32
bits. Fix comment typo.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc/split-fail12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/misc/split-fail b/tests/misc/split-fail
index d2aab4dbb..462c780e8 100755
--- a/tests/misc/split-fail
+++ b/tests/misc/split-fail
@@ -36,10 +36,12 @@ _POSIX2_VERSION=199209 split -1 in 2> /dev/null || fail=1
# Then make sure that -0 evokes a failure.
_POSIX2_VERSION=199209 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
+# Ensure that split --lines=N and --bytes=N work for N=2^32,
+# assuming our host supports integers that wide.
+if _4gb=`expr 4294967296 + 0 2>/dev/null`; then
+ split --lines=$_4gb in || fail=1
+ split --bytes=$_4gb in || fail=1
+fi
# Currently (coreutils-5.0.1) split --line-bytes=M fails
# with `invalid number of bytes' for M=2^32 or larger. Actually,
@@ -55,7 +57,7 @@ env -u _POSIX2_VERSION split -99999999999999999991 2> out && fail=1
# split: line count option -9999999999... is too large
# while on most, we get this:
# split: line count option -99999999999999999991... is too large
-# so map them both to -99*1...
+# so map them both to -99*.
sed 's/99[19]*/99*/' out > out-t
mv -f out-t out