Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't print report properly on Alpine Linux #49

Closed
andreiborisov opened this issue May 25, 2020 · 2 comments · Fixed by #50
Closed

Doesn't print report properly on Alpine Linux #49

andreiborisov opened this issue May 25, 2020 · 2 comments · Fixed by #50
Labels
bug Something isn't working

Comments

@andreiborisov
Copy link
Contributor

andreiborisov commented May 25, 2020

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
Copy link
Owner

jorgebucaran commented May 25, 2020

@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?

@jorgebucaran jorgebucaran added the bug Something isn't working label May 25, 2020
@andreiborisov
Copy link
Contributor Author

Thanks! The cause was just nearby your suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants