summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2010-08-06 21:30:17 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2010-08-06 21:30:50 -0700
commitb877ea4b3ee4c62ab75caedbfdcca4877961aedf (patch)
tree92f4f2e66a13e68f3f19ec74b8a86702be6c5a09 /tests
parentbdde34f95858e6ec3e6912055da3df0b033a1518 (diff)
downloadcoreutils-b877ea4b3ee4c62ab75caedbfdcca4877961aedf.tar.xz
sort: support all combinations of -d, -f, -i, -R, and -V
* NEWS: Document this. * src/sort.c (getmonth): Omit LEN arg, as MONTH is now null-terminated. (compare_random): Don't null-terminate keys, as caller now does that. (compare_version): Remove. (debug_key): Null-terminate string for getmonth. (keycompare): Support combining -R with any of -d, -f, -i, -V. Also, support combining -V with any of -d, -i. (check_ordering_compatibility): Allow newly-supported combinations. * tests/misc/sort (02q, 02r, 02s): New tests, for new combinations. (incompat2): Now test -nR, since -fR are now compatible.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc/sort8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/misc/sort b/tests/misc/sort
index 202951c67..fedbf278f 100755
--- a/tests/misc/sort
+++ b/tests/misc/sort
@@ -92,6 +92,10 @@ my @Tests =
{ERR=>"$prog: -:3: disorder: B\n"}, $normalize_filename],
["02p", '-cu', {IN=>"B\nA\nB\n"}, {OUT=>''}, {EXIT=>1},
{ERR=>"$prog: -:2: disorder: A\n"}, $normalize_filename],
+["02q", '-c -k 1,1fR', {IN=>"ABC\nABc\nAbC\nAbc\naBC\naBc\nabC\nabc\n"}],
+["02r", '-c -k 1,1fV', {IN=>"ABC\nABc\nAbC\nAbc\naBC\naBc\nabC\nabc\n"}],
+["02s", '-c -k 1,1dfR',
+ {IN=>".ABC\n.ABc.\nA.bC\nA.bc.\naB.C\naB.c.\nabC.\nabc..\n"}],
#
["03a", '-k1', {IN=>"B\nA\n"}, {OUT=>"A\nB\n"}],
["03b", '-k1,1', {IN=>"B\nA\n"}, {OUT=>"A\nB\n"}],
@@ -335,8 +339,8 @@ my @Tests =
# Specifying incompatible options should evoke a failure.
["incompat1", '-in', {EXIT=>2},
{ERR=>"$prog: options `-in' are incompatible\n"}],
-["incompat2", '-fR', {EXIT=>2},
- {ERR=>"$prog: options `-fR' are incompatible\n"}],
+["incompat2", '-nR', {EXIT=>2},
+ {ERR=>"$prog: options `-nR' are incompatible\n"}],
["incompat3", '-dfgiMnR', {EXIT=>2},
{ERR=>"$prog: options `-dfgMnR' are incompatible\n"}],
["incompat4", qw(-c -o /dev/null), {EXIT=>2},