[Toybox] sort tests broken?

enh enh at google.com
Tue Aug 23 09:55:09 PDT 2022


no, and (oddly?) neither does _reverting_ that change...

~$ git clone https://github.com/landley/toybox.git toybox
Cloning into 'toybox'...
cdremote: Enumerating objects: 26019, done.
remote: Counting objects: 100% (137/137), done.
remote: Compressing objects: 100% (62/62), done.
remote: Total 26019 (delta 78), reused 108 (delta 75), pack-reused 25882
Receiving objects: 100% (26019/26019), 11.00 MiB | 19.84 MiB/s, done.
Resolving deltas:  24% (4531/18878))
Resolving deltas: 100% (18878/18878), done.
m~$ cd toybox
~/toybox$ make macos_defconfig
cc -o kconfig/conf kconfig/conf.c kconfig/zconf.tab.c -DKBUILD_NO_NLS=1 \
-DPROJECT_NAME=\"ToyBox\"
scripts/genconfig.sh
KCONFIG_ALLCONFIG=./kconfig/macos_miniconfig kconfig/conf -n Config.in >
/dev/null
~/toybox$ make test_sort
scripts/test.sh sort
scripts/runtest.sh: line 217: syntax error near unexpected token `;'
scripts/runtest.sh: line 217: `      R) LEN=0; B=1; ;&'
sort:Library probe
generated/{Config.in,newtoys.h,flags.h,globals.h,tags.h,help.h}
Compile generated/testdir/sort..................
scripts/test.sh: line 42: realpath: command not found
usage: dirname string [...]
PASS: sort unknown argument
PASS: sort sort
PASS: sort #2
PASS: sort stdin
PASS: sort numeric
PASS: sort reverse
PASS: sort sort -o
PASS: sort sort -o same
PASS: sort one key
PASS: sort key range with numeric option
PASS: sort key range with numeric option and global reverse
PASS: sort key range with multiple options
PASS: sort key doesn't strip leading blanks, disables fallback global sort
PASS: sort key edge case with -t
PASS: sort -k2,2f
PASS: sort -k2,2
PASS: sort -f -k2,2
PASS: sort -t, -k3n
scripts/runtest.sh: eval: line 150: syntax error near unexpected token `&'
scripts/runtest.sh: eval: line 150: `"/sort" -c |& grep -o [0-9]*'
FAIL: sort -c
echo -ne 'a\nb\na\nc' | "/sort" -c |& grep -o [0-9]*
--- expected 2022-08-23 09:54:03.000000000 -0700
+++ actual 2022-08-23 09:54:03.000000000 -0700
@@ -1 +0,0 @@
-3
make: *** [test_sort] Error 1
~/toybox$ git revert 529a25a2eea4
[master 053fefd1] Revert "Sort -c reported line number was off by one."
 2 files changed, 2 insertions(+), 3 deletions(-)
~/toybox$ make test_sort
scripts/test.sh sort
scripts/runtest.sh: line 217: syntax error near unexpected token `;'
scripts/runtest.sh: line 217: `      R) LEN=0; B=1; ;&'
sort:generated/{newtoys.h,flags.h,globals.h,tags.h,help.h}
Compile generated/testdir/sort.....
scripts/test.sh: line 42: realpath: command not found
usage: dirname string [...]
PASS: sort unknown argument
PASS: sort sort
PASS: sort #2
PASS: sort stdin
PASS: sort numeric
PASS: sort reverse
PASS: sort sort -o
PASS: sort sort -o same
PASS: sort one key
PASS: sort key range with numeric option
PASS: sort key range with numeric option and global reverse
PASS: sort key range with multiple options
PASS: sort key doesn't strip leading blanks, disables fallback global sort
PASS: sort key edge case with -t
PASS: sort -k2,2f
PASS: sort -k2,2
PASS: sort -f -k2,2
PASS: sort -t, -k3n
scripts/runtest.sh: eval: line 150: syntax error near unexpected token `&'
scripts/runtest.sh: eval: line 150: `"/sort" -uc |& grep -o [0-9]*'
FAIL: sort -c
echo -ne 'a\nb\nb\nc' | "/sort" -uc |& grep -o [0-9]*
--- expected 2022-08-23 09:54:35.000000000 -0700
+++ actual 2022-08-23 09:54:35.000000000 -0700
@@ -1 +0,0 @@
-3
make: *** [test_sort] Error 1
~/toybox$

On Mon, Aug 22, 2022 at 8:03 PM Rob Landley <rob at landley.net> wrote:

> On 8/22/22 11:09, enh via Toybox wrote:
> >
> > FAIL: sort -c
> > echo -ne 'a\nb\na\nc' | "/usr/bin/sort" -c |& grep -o [0-9]*
> > --- expected 2022-08-22 08:56:24.000000000 -0700
> > +++ actual 2022-08-22 08:56:24.000000000 -0700
> > @@ -1 +0,0 @@
> > -3
> > make: *** [test_sort] Error 1
>
> Commit 529a25a2eea4 didn't fix it for you?
>
> Rob
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20220823/049d7785/attachment.htm>


More information about the Toybox mailing list