From cb3147d29860195780f745faf42e2b8a02bdcbf5 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 20 Feb 2008 08:36:56 +0100 Subject: 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. --- tests/sort/Test.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/sort') 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 -- cgit v1.2.3-54-g00ecf