diff options
author | Pádraig Brady <P@draigBrady.com> | 2009-06-30 00:52:43 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2009-07-03 17:00:55 +0100 |
commit | acc01947af2e025d11016f3a4b0a26beb06dd120 (patch) | |
tree | 278d23fc40bed474e0ca30315a628e9fcf7629a7 /tests | |
parent | d9f83f9a603a2f5ecdc13bbe65e22aba49d43d66 (diff) | |
download | coreutils-acc01947af2e025d11016f3a4b0a26beb06dd120.tar.xz |
sort: allow SI and IEC units on separate human sort fields
* src/sort.c: Store the si_present state per key rather than globally
* tests/misc/sort: Add a check that would have previously failed.
Also add a test to demonstrate that invalid IEC/SI mixtures are not
always noticed when they're not significant to the sort.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/misc/sort | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/misc/sort b/tests/misc/sort index 21e7af8e9..b1f012059 100755 --- a/tests/misc/sort +++ b/tests/misc/sort @@ -71,6 +71,10 @@ my @Tests = {ERR=>"$prog: options `-hn' are incompatible\n"}], # check key processing ["h8", '-n -k2,2h', {IN=>"1 1E\n2 2M\n"}, {OUT=>"2 2M\n1 1E\n"}], +# SI and IEC prefixes on separate keys allowed +["h9", '-h -k1,1 -k2,2', {IN=>"1M 1Mi\n1M 1Mi\n"}, {OUT=>"1M 1Mi\n1M 1Mi\n"}], +# This invalid SI and IEC prefix mixture is not significant so not noticed +["h10", '-h -k1,1 -k2,2', {IN=>"1M 2M\n2M 1Mi\n"}, {OUT=>"1M 2M\n2M 1Mi\n"}], ["01a", '', {IN=>"A\nB\nC\n"}, {OUT=>"A\nB\nC\n"}], # |