diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/misc/sort | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/misc/sort b/tests/misc/sort index 3e8eda6ae..3af2388a5 100755 --- a/tests/misc/sort +++ b/tests/misc/sort @@ -110,6 +110,8 @@ my @Tests = ["07b", '-k 2,3', {IN=>"a a b\nz a a\n"}, {OUT=>"z a a\na a b\n"}], ["07c", '-k 2,3', {IN=>"y k b\nz k a\n"}, {OUT=>"z k a\ny k b\n"}], ["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"}], # # report an error for `.' without following char spec ["08a", '-k 2.,3', {EXIT=>2}, @@ -210,6 +212,10 @@ my @Tests = # key start and key end. ["18e", '-nb -k1.1,1.2', {IN=>" 901\n100\n"}, {OUT=>"100\n 901\n"}], +# When ignoring leading blanks for end position, ensure blanks from +# next field are not included in the sort. I.E. order should not change here. +["18f", '-k1,1b', {IN=>"a y\na z\n"}, {OUT=>"a y\na z\n"}], + # This looks odd, but works properly -- 2nd keyspec is never # used because all lines are different. ["19a", '+0 +1nr', {IN=>"b 2\nb 1\nb 3\n"}, {OUT=>"b 1\nb 2\nb 3\n"}], |