1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-01 05:27:45 +00:00

sort: implement --debug

This adds a --debug flag, which, when activated, will draw lines below
the characters that are actually used for comparisons.

This is not a complete implementation of --debug. It should, quoting the man page
for GNU sort: "annotate the part of the line used to sort, and warn
about questionable usage to stderr". Warning about "questionable usage"
is not part of this patch.

This change required some adjustments to be able to get the range that
is actually used for comparisons. Most notably, general numeric comparisons
were rewritten, fixing some bugs along the lines.

Testing is mostly done by adding fixtures for the expected debug output of
existing tests.
This commit is contained in:
Michael Debertol 2021-04-21 19:03:36 +02:00
parent fb2ae04b8f
commit e6f6b109a5
56 changed files with 2010 additions and 221 deletions

1
Cargo.lock generated
View file

@ -2297,6 +2297,7 @@ dependencies = [
"rayon",
"semver",
"smallvec 1.6.1",
"unicode-width",
"uucore",
"uucore_procs",
]