Doesn't print report properly on Alpine Linux
andreiborisov opened this issue · 2 comments
andreiborisov commented
Similar to jorgebucaran/fisher#565, Fishtape doesn't work properly with BusyBox awk
.
Actual testing seems to work just fine, however, reporting is not correct.
On macOS:
$ fishtape test/*.test.fish
TAP version 13
ok 1 print path for a standalone script
ok 2 print path for a Fisher package
ok 3 print path for a manually installed function
1..3
# pass 3
# ok
But on Alpine Linux
$ fishtape test/*.test.fish
TAP version 13
0 print path for a standalone script
1 print path for a Fisher package
2 print path for a manually installed function
1..
# pass 0
# ok
Any idea what might be a problem judging by the output?
jorgebucaran commented
@andreiborisov Possibly in this section, specifically here, and here.
Maybe we just need to wrap some stuff around (), so instead of:
? mesg : sub(/ok/, "ok " ++total, batch[$1 i])\
? batch[$1 i] ((error = batch[$1 i "error"]) && ++failed ? "\n" error : "") : ""
...this:
? mesg : sub(/ok/, "ok " (++total), batch[$1 i])\
? batch[$1 i] ((error = batch[$1 i "error"]) && (++failed) ? "\n" error : "") : ""
Could you try that out?
andreiborisov commented
Thanks! The cause was just nearby your suggestion.