[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Need help understanding sort tests
From: |
Andy Jewell |
Subject: |
Need help understanding sort tests |
Date: |
Fri, 1 Feb 2008 09:01:36 -0500 |
In the test suite for sort (coreutils 6.9), there are two tests that
seem to be testing for incorrect behavior.
I'm hoping someone will help me understand why the behavior in the
test is correct.
Here are the commands, and the expected output. (The tests are 10f and
10g).
sort -t : -k 1.3,1.3
:ba
:ab
sort -k 1.4,1.4
b ba
a ab
In both of these cases it seems that the explicit -k matches an empty
string, which would compare equal, so it would fall back to the last
resort memcmp of the whole line, which would produce the opposite
ordering from above.
So what am I missing?
many thanks,
adj
- Need help understanding sort tests,
Andy Jewell <=