summaryrefslogtreecommitdiff
path: root/tests/misc/join
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2008-12-12 10:25:34 +0000
committerPádraig Brady <P@draigBrady.com>2009-01-03 15:10:42 +0000
commit99be9078383e7fc95bf84b42ea6a0e50afbe6ff4 (patch)
tree7dd1a2fc5b09c15d720881d2dccb5672db641c1c /tests/misc/join
parent1ead0858263428d36a193f400fed24bf9635268a (diff)
downloadcoreutils-99be9078383e7fc95bf84b42ea6a0e50afbe6ff4.tar.xz
tests: refactor to use the new getlimits utility
* tests/Coreutils.pm: Add function to make limits available * tests/test-lib.sh: ditto * tests/misc/join: Check for both SIZE_OFLOW and UINTMAX_OFLOW rather than using arbitrary 2^128 * tests/misc/sort: ditto * tests/misc/uniq: ditto * tests/misc/printf: Check for both INT_OFLOW and INT_UFLOW rather than using arbitrary -2^31 * tests/misc/seq-long-double: Check for INTMAX_OFLOW rather than using arbitrary 2^63 * tests/misc/split-fail: Check --lines --bytes and --line-bytes options limits on all platforms. Note getlimits obviates the need to use expr to check if 32 bit integers are supported, which I think was invalid anyway as expr now supports bignum? * tests/misc/test: Check for UINTMAX_OFLOW rather than using arbitrary 2^64 and 2^128. Check for INTMAX_UFLOW rather than using arbitrary -2^64 * tests/misc/timeout-parameters: Check for UINT_OFLOW rather than using arbitrary 2^32 * tests/misc/truncate-overflow: Don't depend on truncate to determine if we're on a 32 or 64 bit platform and instead use the various OFF_T limits * tests/misc/sort-merge: Check for UINTMAX_OFLOW rather than using arbitrary 2^64+1 * tests/misc/unexpand: ditto
Diffstat (limited to 'tests/misc/join')
-rwxr-xr-xtests/misc/join7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/misc/join b/tests/misc/join
index 4c36c32a5..2d9db78f4 100755
--- a/tests/misc/join
+++ b/tests/misc/join
@@ -18,6 +18,8 @@
use strict;
+my $limits = getlimits ();
+
# Turn off localization of executable's output.
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
@@ -138,7 +140,10 @@ my @tv = (
[t_subst "a:1\nb:1\n", t_subst "a:2:\nb:2:\n"],
t_subst "a:1:2:\nb:1:2:\n", 0],
-['bigfield', '-1 340282366920938463463374607431768211456 -2 2',
+# fields > SIZE_MAX are silently interpreted as SIZE_MAX
+['bigfield1', "-1 $limits->{'UINTMAX_OFLOW'} -2 2",
+ ["a\n", "b\n"], " a b\n", 0],
+['bigfield2', "-1 $limits->{'SIZE_OFLOW'} -2 2",
["a\n", "b\n"], " a b\n", 0],
# FIXME: change this to ensure the diagnostic makes sense