tokuhirom / Test-Pretty

Other
20 stars 17 forks source link

subtest return value is wrong #16

Open osfameron opened 10 years ago

osfameron commented 10 years ago

With a test like:

use Test::More;

subtest 'Test subtest return value' => sub {
    ok 1;
    ok 0; # whole subtest has failed!
    ok 1;
} and diag "SUCCESS!";

done_testing;

The subtest should return a false value, but under Test::Pretty it returns true (from the last expression in the subtest). Running perl -MTest::Pretty test.t prints "SUCCESS!" which is a change of behaviour from standard Test behaviour.

tokuhirom commented 10 years ago

patches welcome.

osfameron commented 10 years ago

will have a look later if I get chance and can figure it out :-)

On 25 April 2014 10:40, Tokuhiro Matsuno notifications@github.com wrote:

patches welcome.

— Reply to this email directly or view it on GitHubhttps://github.com/tokuhirom/Test-Pretty/issues/16#issuecomment-41375360 .