summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2011-05-06 08:07:46 +0100
committerPádraig Brady <P@draigBrady.com>2011-05-06 08:07:46 +0100
commitebce7bfb1b2e745553043b8d7feb7c2131426fc2 (patch)
treec51b1d8bc1056cbc58390389d1565db79a7fd7f5 /tests
parent9aeffd3fe549116c043b61ec0d593a7d4c004a44 (diff)
downloadcoreutils-ebce7bfb1b2e745553043b8d7feb7c2131426fc2.tar.xz
sort: fix a contradictory --debug warning
* src/sort.c (key_warn): `sort -k2,1n --debug` would output warnings about being both "zero width" and "spanning multiple fields". Suppress the latter one. * tests/misc/sort-debug-warn: Add a couple of test cases.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc/sort-debug-warn6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/misc/sort-debug-warn b/tests/misc/sort-debug-warn
index def25715a..5ae00022c 100755
--- a/tests/misc/sort-debug-warn
+++ b/tests/misc/sort-debug-warn
@@ -23,6 +23,10 @@ cat <<\EOF > exp
sort: using simple byte comparison
sort: key 1 has zero width and will be ignored
sort: using simple byte comparison
+sort: key 1 has zero width and will be ignored
+sort: using simple byte comparison
+sort: key 1 is numeric and spans multiple fields
+sort: using simple byte comparison
sort: options `-bghMRrV' are ignored
sort: using simple byte comparison
sort: options `-bghMRV' are ignored
@@ -50,6 +54,8 @@ sort: using simple byte comparison
EOF
sort -s -k2,1 --debug /dev/null 2>>out
+sort -s -k2,1n --debug /dev/null 2>>out
+sort -s -k1,2n --debug /dev/null 2>>out
sort -s -rRVMhgb -k1,1n --debug /dev/null 2>>out
sort -rRVMhgb -k1,1n --debug /dev/null 2>>out
sort -r -k1,1n --debug /dev/null 2>>out