summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAssaf Gordon <assafgordon@gmail.com>2016-05-31 20:11:34 -0400
committerAssaf Gordon <assafgordon@gmail.com>2016-05-31 21:29:52 -0400
commitd548f87595a193e21b170368bc8fc2ded4dadb73 (patch)
tree13b0bd4a6198f0efa80dc2fab926e459d82f5400 /tests
parent7945e09e7b1164cc463d6f6c2bb717211276df74 (diff)
downloadcoreutils-d548f87595a193e21b170368bc8fc2ded4dadb73.tar.xz
tests: sort-debug-warn: add progress information lines
Easier troubleshooting of individual 'sort --debug' messages. Discussed in http://bugs.gnu.org/23665 . * tests/misc/sort-debug-warn.sh: add progress number before each sort invocation.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc/sort-debug-warn.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/misc/sort-debug-warn.sh b/tests/misc/sort-debug-warn.sh
index a31132d9c..b7ad44966 100755
--- a/tests/misc/sort-debug-warn.sh
+++ b/tests/misc/sort-debug-warn.sh
@@ -20,57 +20,93 @@
print_ver_ sort
cat <<\EOF > exp
+1
sort: using simple byte comparison
sort: key 1 has zero width and will be ignored
+2
sort: using simple byte comparison
sort: key 1 has zero width and will be ignored
+3
sort: using simple byte comparison
sort: key 1 is numeric and spans multiple fields
+4
sort: using simple byte comparison
sort: options '-bghMRrV' are ignored
+5
sort: using simple byte comparison
sort: options '-bghMRV' are ignored
sort: option '-r' only applies to last-resort comparison
+6
sort: using simple byte comparison
sort: option '-r' only applies to last-resort comparison
+7
sort: using simple byte comparison
sort: options '-bg' are ignored
+8
sort: using simple byte comparison
+9
sort: using simple byte comparison
sort: option '-b' is ignored
+10
sort: using simple byte comparison
+11
sort: using simple byte comparison
+12
sort: using simple byte comparison
sort: leading blanks are significant in key 1; consider also specifying 'b'
+13
sort: using simple byte comparison
sort: leading blanks are significant in key 1; consider also specifying 'b'
sort: option '-d' is ignored
+14
sort: using simple byte comparison
sort: leading blanks are significant in key 1; consider also specifying 'b'
sort: option '-i' is ignored
+15
sort: using simple byte comparison
+16
sort: using simple byte comparison
+17
sort: using simple byte comparison
+18
sort: failed to set locale; using simple byte comparison
EOF
+echo 1 >> out
sort -s -k2,1 --debug /dev/null 2>>out
+echo 2 >> out
sort -s -k2,1n --debug /dev/null 2>>out
+echo 3 >> out
sort -s -k1,2n --debug /dev/null 2>>out
+echo 4 >> out
sort -s -rRVMhgb -k1,1n --debug /dev/null 2>>out
+echo 5 >> out
sort -rRVMhgb -k1,1n --debug /dev/null 2>>out
+echo 6 >> out
sort -r -k1,1n --debug /dev/null 2>>out
+echo 7 >> out
sort -gbr -k1,1n -k1,1r --debug /dev/null 2>>out
+echo 8 >> out
sort -b -k1b,1bn --debug /dev/null 2>>out # no warning
+echo 9 >> out
sort -b -k1,1bn --debug /dev/null 2>>out
+echo 10 >> out
sort -b -k1,1bn -k2b,2 --debug /dev/null 2>>out # no warning
+echo 11 >> out
sort -r -k1,1r --debug /dev/null 2>>out # no warning for redundant options
+echo 12 >> out
sort -i -k1,1i --debug /dev/null 2>>out # no warning
+echo 13 >> out
sort -d -k1,1b --debug /dev/null 2>>out
+echo 14 >> out
sort -i -k1,1d --debug /dev/null 2>>out
+echo 15 >> out
sort -r --debug /dev/null 2>>out #no warning
+echo 16 >> out
sort -rM --debug /dev/null 2>>out #no warning
+echo 17 >> out
sort -rM -k1,1 --debug /dev/null 2>>out #no warning
+echo 18 >> out
LC_ALL=missing sort --debug /dev/null 2>>out
compare exp out || fail=1