summaryrefslogtreecommitdiff
path: root/tests/sort/Test.pm
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-09-14 02:20:55 +0000
committerJim Meyering <jim@meyering.net>1997-09-14 02:20:55 +0000
commit75b17ba951693fa2e91a868535df4529f2536ad6 (patch)
treee025a4412ff9b221c8d9b0c7ef962140d40e3dcf /tests/sort/Test.pm
parent76bf15f3f5e8be468dfb33bc53dc70a31c9d2df3 (diff)
downloadcoreutils-75b17ba951693fa2e91a868535df4529f2536ad6.tar.xz
Add tests 19a and 19b.
Diffstat (limited to 'tests/sort/Test.pm')
-rwxr-xr-xtests/sort/Test.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/sort/Test.pm b/tests/sort/Test.pm
index bf2729f03..1419147e6 100755
--- a/tests/sort/Test.pm
+++ b/tests/sort/Test.pm
@@ -149,6 +149,14 @@ my @tv = (
# Equivalent to above, except it ignores both leading and trailing blanks.
["18e", '-nb -k1.1,1.2', " 901\n100\n", "100\n 901\n", 0],
+# This looks odd, but works properly -- 2nd keyspec is never
+# used because all lines are different.
+["19a", '+0 +1nr', "b 2\nb 1\nb 3\n", "b 1\nb 2\nb 3\n", 0],
+
+# The test *intended* by the author of the above, but using the
+# more-intuitive POSIX-style -k options.
+["19b", '-k1,1 -k2nr', "b 2\nb 1\nb 3\n", "b 3\nb 2\nb 1\n", 0],
+
);
sub test_vector