Closed cmihai closed 5 years ago
Concept ACK
One question about the fancy sort call:
$ cat > test
[x] ka
[x] gb
[ ] sc
[x] ad
$ cat test | sort -t / -k 1.6 | sort -s -t / -k 1.3,1.5 -r
[ ] sc
[x] ka
[x] gb
[x] ad
should this not be the other way around?
(I was checking to see whether GNU sort and BSD sort do the same things, checked on macOS / BSD sort)
@scravy In the run-unit-tests
output, there's also a dash at the beginning, so the sort
takes characters 3 to 5 as the sort key (instead of 1 to 3).
I see! My bad 🤗
ACK eb088f0
This commit modifies the sort order for the results of run-unit-tests.sh.
Previously, they were sorted lexicographically, which meant that the failing tests showed on top and could potentially disappear off-screen. Now, the test results are sorted first by name (from character 6 to the end of the line), then by status (characters 3 to 5) in reverse order.
Tested on Linux, however, according to the manpage, the same options should work on MacOS as well.