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

TAP::Parser::Aggregator->all_passed returns false when no tests run #62

Open
zoffixznet opened this issue Apr 5, 2017 · 0 comments
Open

Comments

@zoffixznet
Copy link

zoffixznet commented Apr 5, 2017

Had a bug in my code because I assumed ->all_passed was the same as "everything is good". But this method returns false if all tests were skipped, like with plan skip_all => 'some reason'.

The end of the output here shows the ->all_passed returned false when the test file had skipped all tests. I would've expected it to return true.

zoffix@leliana:/tmp/tmp.jx6I5dc73b$ perl -v | grep version
This is perl 5, version 24, subversion 0 (v5.24.0) built for x86_64-linux-multi
zoffix@leliana:/tmp/tmp.jx6I5dc73b$ perl -MTAP::Harness -wlE 'say TAP::Harness->VERSION'
3.36
zoffix@leliana:/tmp/tmp.jx6I5dc73b$ cat foo.t 
use Test::More;
plan skip_all => 'some reason';
zoffix@leliana:/tmp/tmp.jx6I5dc73b$ perl -MTAP::Harness -wlE 'my $res = TAP::Harness->new->runtests("foo.t"); say "--------\nAll tests passed: " . $res->all_passed'
foo.t .. 
              
foo.t .. 
skipped: some reason

Files=1, Tests=0,  1 wallclock secs ( 0.05 usr  0.01 sys +  0.03 cusr  0.01 csys =  0.10 CPU)

Result: NOTESTS

--------
All tests passed: 0
zoffix@leliana:/tmp/tmp.jx6I5dc73b$ 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant