summaryrefslogtreecommitdiff
path: root/tests/misc/sort
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc/sort')
-rwxr-xr-xtests/misc/sort7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/misc/sort b/tests/misc/sort
index f26bc5fbc..3e8eda6ae 100755
--- a/tests/misc/sort
+++ b/tests/misc/sort
@@ -17,6 +17,8 @@
use strict;
+my $limits = getlimits ();
+
my $prog = 'sort';
# Turn off localization of executable's output.
@@ -302,7 +304,10 @@ my @Tests =
['nul-tab', "-k2,2 -t '\\0'",
{IN=>"a\0z\01\nb\0y\02\n"}, {OUT=>"b\0y\02\na\0z\01\n"}],
-["bigfield", qw(-k 340282366920938463463374607431768211456),
+# fields > SIZE_MAX are silently interpreted as SIZE_MAX
+["bigfield1", "-k $limits->{'UINTMAX_OFLOW'}",
+ {IN=>"2\n1\n"}, {OUT=>"1\n2\n"}],
+["bigfield2", "-k $limits->{'SIZE_OFLOW'}",
{IN=>"2\n1\n"}, {OUT=>"1\n2\n"}],
# Using an old-style key-specifying option like +1 with an invalid