summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2008-02-20 08:36:56 +0100
committerJim Meyering <meyering@redhat.com>2008-02-20 08:41:29 +0100
commitcb3147d29860195780f745faf42e2b8a02bdcbf5 (patch)
tree4fe7240b19d7d861907ae2f5713361c3aea8034a /tests
parentc78039b87de6c636a167d3206081cced54af08e2 (diff)
downloadcoreutils-cb3147d29860195780f745faf42e2b8a02bdcbf5.tar.xz
sort: add --sort=... option.
* src/sort.c (SORT_OPTION): New enum. (sort_args, sort_types): Define. (usage, long_options, main): New option --sort. * tests/sort/Test.pm: Test it. * doc/coreutils.texi (sort invocation): Document --sort option. * NEWS: Mention this.
Diffstat (limited to 'tests')
-rw-r--r--tests/sort/Test.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/sort/Test.pm b/tests/sort/Test.pm
index e4d98be47..0462973c0 100644
--- a/tests/sort/Test.pm
+++ b/tests/sort/Test.pm
@@ -274,6 +274,7 @@ my @tv = (
["incompat4", '-c -o /dev/null', '', '', 2],
["incompat5", '-C -o /dev/null', '', '', 2],
["incompat6", '-cC', '', '', 2],
+["incompat7", '--sort=random -n', '', '', 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],
@@ -289,6 +290,9 @@ my @tv = (
# Exercise the code that enlarges the line buffer. See the thread here:
# http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/11006
['realloc-buf', '-S1', 'a'x4000 ."\n", 'a'x4000 ."\n", 0],
+
+["sort-numeric", '--sort=numeric', ".01\n0\n", "0\n.01\n", 0],
+["sort-gennum", '--sort=general-numeric', "1e2\n2e1\n", "2e1\n1e2\n", 0],
);
sub test_vector