On Sun Oct 26 17:58:43 2014, ETHER wrote:
Show quoted text>
>
> ...
> # Looks like you planned 56 tests but ran 57.
> t/Unicode.t ................
> Dubious, test returned 255 (wstat 65280, 0xff00)
> All 56 subtests passed
> ...
>
> this is perl 5.014004 built for darwin-2level -- cpantesters report sent.
I also experienced this error today when running Encode's tests as part of a smoke-test of the Perl 5 core distribution test suite. Cf.
http://perl5.test-smoke.org/report/91893.
I believe the problem arises because on the one hand, you have hard-coded the number of tests in the file:
#####
use Test::More tests => 56;
#####
But on the other hand, the number of tests depends on the size of @file at line 162.
#####
158 my $dir = dirname(__FILE__);
159 opendir my $dh, $dir or die "$dir:$!";
160 my @file = sort grep {/\.utf$/o} readdir $dh;
161 closedir $dh;
162 for my $file (@file){
163 my $path = File::Spec->catfile($dir, $file);
...
175 is(decode("UTF-7", encode("UTF-7", $content)), $content,
176 "UTF-7 RT:$file");
177 }
#####
If there are tempfiles or if we are testing in parallel -- as I was -- this number could vary.
I believe you could simply sidestep this problem by using Test::More::done_testing() at the end of the file rather than a hard-coded plan.
Thank you very much.
Jim Keenan