summaryrefslogtreecommitdiff
path: root/tests/misc/sort
diff options
context:
space:
mode:
authorCliff Miller <cbm@whatexit.org>2009-06-11 18:30:32 +0100
committerPádraig Brady <P@draigBrady.com>2009-06-13 01:25:06 +0100
commit24c727d3c26122c4f1c29381e7c6f5d96985ccca (patch)
tree24443f3009e77d0ae83758b8f17147c0955d80ac /tests/misc/sort
parentba1c5239bc4b9719a20cedd35a313fa4237e7151 (diff)
downloadcoreutils-24c727d3c26122c4f1c29381e7c6f5d96985ccca.tar.xz
sort: Ignore fields where end position is before the start position
* NEWS: Mention the fix * THANKS: Add Cliff Miller * src/sort.c (keycompare): Ensure lima >= texta * tests/misc/sort: Add 3 corresponding tests Signed-off-by: Pádraig Brady <P@draigBrady.com>
Diffstat (limited to 'tests/misc/sort')
-rwxr-xr-xtests/misc/sort4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/misc/sort b/tests/misc/sort
index ae3bd8e49..21e7af8e9 100755
--- a/tests/misc/sort
+++ b/tests/misc/sort
@@ -134,6 +134,10 @@ my @Tests =
["07d", '+1 -3', {IN=>"y k b\nz k a\n"}, {OUT=>"z k a\ny k b\n"}],
# ensure a character position of 0 includes whole field
["07e", '-k 2,3.0', {IN=>"a a b\nz a a\n"}, {OUT=>"z a a\na a b\n"}],
+# ensure fields with end position before start are ignored
+["07f", '-n -k1.3,1.1', {IN=>"a 2\nb 1\n"}, {OUT=>"a 2\nb 1\n"}],
+["07g", '-n -k2.2,1.2', {IN=>"aa 2\nbb 1\n"}, {OUT=>"aa 2\nbb 1\n"}],
+["07h", '-k1.3nb,1.3', {IN=>" a 2\n b 1\n"}, {OUT=>" a 2\n b 1\n"}],
#
# report an error for `.' without following char spec
["08a", '-k 2.,3', {EXIT=>2},