You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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$
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: