]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
sort: clarify in --debug; only text comparisons affected
authorPádraig Brady <P@draigBrady.com>
Mon, 18 Feb 2019 03:16:37 +0000 (19:16 -0800)
committerPádraig Brady <P@draigBrady.com>
Mon, 18 Feb 2019 03:17:17 +0000 (19:17 -0800)
* src/sort.c (main): Adjust the debug info regarding locales,
to clarify that only textual comparisons are affected.
* tests/misc/sort-debug-warn.sh: Adjust accordingly.
Fixes https://bugs.gnu.org/34490

src/sort.c
tests/misc/sort-debug-warn.sh

index 5ab363f8c4fc9eea44d24995261596e784ad3c1e..d812aa999054cfa1dd1ee12d5322abde3bf64a5c 100644 (file)
@@ -4689,10 +4689,11 @@ main (int argc, char **argv)
       if (! locale_ok)
           error (0, 0, "%s", _("failed to set locale"));
       if (hard_LC_COLLATE)
-        error (0, 0, _("using %s sorting rules"),
+        error (0, 0, _("text ordering performed using %s sorting rules"),
                quote (setlocale (LC_COLLATE, NULL)));
       else
-        error (0, 0, "%s", _("using simple byte comparison"));
+        error (0, 0, "%s",
+               _("text ordering performed using simple byte comparison"));
 
       key_warnings (&gkey, gkey_only);
     }
index 3cb521cec78a0dea7ef91e97ba706538dc0911c8..cb9a9d67bec9a3d3dc7b5c6deababa6de64e84e4 100755 (executable)
@@ -21,55 +21,55 @@ print_ver_ sort
 
 cat <<\EOF > exp
 1
-sort: using simple byte comparison
+sort: text ordering performed using simple byte comparison
 sort: key 1 has zero width and will be ignored
 2
-sort: using simple byte comparison
+sort: text ordering performed using simple byte comparison
 sort: key 1 has zero width and will be ignored
 3
-sort: using simple byte comparison
+sort: text ordering performed using simple byte comparison
 sort: key 1 is numeric and spans multiple fields
 4
-sort: using simple byte comparison
+sort: text ordering performed using simple byte comparison
 sort: options '-bghMRrV' are ignored
 5
-sort: using simple byte comparison
+sort: text ordering performed 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: text ordering performed using simple byte comparison
 sort: option '-r' only applies to last-resort comparison
 7
-sort: using simple byte comparison
+sort: text ordering performed using simple byte comparison
 sort: leading blanks are significant in key 2; consider also specifying 'b'
 sort: options '-bg' are ignored
 8
-sort: using simple byte comparison
+sort: text ordering performed using simple byte comparison
 9
-sort: using simple byte comparison
+sort: text ordering performed using simple byte comparison
 sort: option '-b' is ignored
 10
-sort: using simple byte comparison
+sort: text ordering performed using simple byte comparison
 11
-sort: using simple byte comparison
+sort: text ordering performed using simple byte comparison
 sort: leading blanks are significant in key 1; consider also specifying 'b'
 12
-sort: using simple byte comparison
+sort: text ordering performed using simple byte comparison
 sort: leading blanks are significant in key 1; consider also specifying 'b'
 13
-sort: using simple byte comparison
+sort: text ordering performed 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: text ordering performed 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
+sort: text ordering performed using simple byte comparison
 16
-sort: using simple byte comparison
+sort: text ordering performed using simple byte comparison
 17
-sort: using simple byte comparison
+sort: text ordering performed using simple byte comparison
 EOF
 
 echo 1 >> out
@@ -112,7 +112,7 @@ compare exp out || fail=1
 
 cat <<\EOF > exp
 sort: failed to set locale
-sort: using simple byte comparison
+sort: text ordering performed using simple byte comparison
 EOF
 
 LC_ALL=missing sort --debug /dev/null 2>out
@@ -126,7 +126,7 @@ fi
 
 
 cat <<\EOF > exp
-sort: using simple byte comparison
+sort: text ordering performed using simple byte comparison
 sort: key 1 is numeric and spans multiple fields
 sort: obsolescent key '+2 -1' used; consider '-k 3,1' instead
 sort: key 2 has zero width and will be ignored