summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2007-01-24 09:06:57 +0100
committerJim Meyering <jim@meyering.net>2007-01-24 09:06:57 +0100
commita0b2bc8de7c1363f2fe85dd11d28d2b1e68c9d32 (patch)
treee88361b9764c7e197f7a6ecff2971555ee99c078 /tests
parenta0d74a99b786511d037b7fc00038c4cf55151c3a (diff)
downloadcoreutils-a0b2bc8de7c1363f2fe85dd11d28d2b1e68c9d32.tar.xz
* NEWS: New option sort -C, proposed by XCU ERN 127, which looks
like it will be approved. Also add --check=quiet, --check=silent as long aliases, and --check=diagnose-first as an alias for -c. * doc/coreutils.texi (sort invocation): Document this. Also, mention that sort -c can take at most one file. * src/sort.c: Implement this. Include argmatch.h. (usage): Document the change. (CHECK_OPTION): New constant. (long_options): --check now takes an optional argument, and is now treated differently from 'c'. (check_args, check_types): New constant arrays. (check): New arg CHECKONLY, which suppresses diagnostic if -C. (main): Parse the new options. * tests/sort/Test.pm (02d, 02d, incompat5, incompat6): New tests for -C.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/sort/Test.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/sort/Test.pm b/tests/sort/Test.pm
index 6bed61b7f..dc41d9212 100755
--- a/tests/sort/Test.pm
+++ b/tests/sort/Test.pm
@@ -51,6 +51,8 @@ my @tv = (
["02a", '-c', "A\nB\nC\n", '', 0],
["02b", '-c', "A\nC\nB\n", '', 1],
["02c", '-c -k1,1', "a\na b\n", '', 0],
+["02d", '-C', "A\nB\nC\n", '', 0],
+["02e", '-C', "A\nC\nB\n", '', 1],
# This should fail because there are duplicate keys
["02m", '-cu', "A\nA\n", '', 1],
["02n", '-cu', "A\nB\n", '', 0],
@@ -272,6 +274,8 @@ my @tv = (
["incompat2", '-fR', '', '', 2],
["incompat3", '-dfgiMnR', '', '', 2],
["incompat4", '-c -o /dev/null', '', '', 2],
+["incompat5", '-C -o /dev/null', '', '', 2],
+["incompat6", '-cC', '', '', 2],
# -t '\0' is accepted, as of coreutils-5.0.91
['nul-tab', "-k2,2 -t '\\0'", "a\0z\01\nb\0y\02\n", "b\0y\02\na\0z\01\n", 0],