Test-More / test-more

Test2, Test::More, Test::Simple and Test::Builder Perl modules for writing tests
Other
140 stars 89 forks source link

Test::Perl::Critic broken on Test-Simple-1.302007_004 #600

Closed kentfredric closed 9 years ago

kentfredric commented 9 years ago

Test::Perl::Critic does some funky code in all_critic_ok

The redux of which is as follows:

use Test::More;
use Test::Builder;

my $TEST = Test::Builder->new();

sub fake {
  $TEST->use_numbers(0);
  $TEST->no_ending(1);
  # ...
  $TEST->done_testing(1); # a computed number of tests from its deferred magic 
}

fake();

On stable Test::Simple, this emits "1..1"

On the latest dev release, this emits "1..0" and of course makes prove barf with :

xt/author/critic.t .. 
ok - Test::Perl::Critic for "lib/lib/byversion.pm"
1..0
skipped: (no reason given)

Test Summary Report
-------------------
xt/author/critic.t (Wstat: 0 Tests: 1 Failed: 0)
  Parse errors: Bad plan.  You planned 0 tests but ran 1.
Files=1, Tests=1,  3 wallclock secs ( 0.03 usr  0.00 sys +  1.81 cusr  0.60 csys =  2.44 CPU)
Result: FAIL
kentfredric commented 9 years ago

Just checked:

kentfredric commented 9 years ago

This bug is still occurring with both the latest dev versions of Test::Simple and Test::Stream.

exodist commented 9 years ago

thank you for the ping.

kentfredric commented 9 years ago

This appears to fix the issue I had when patched locally.

exodist commented 9 years ago

shipped.