X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FLeaner.pm;h=9e39fe570e61d745eb657348b79751318f86bdc7;hb=1303eb57577f22a6e056b6a237ce3b304c0d7299;hp=4f5327580106e339ac8b87566805459544aa6d52;hpb=95d98c140e711be6185a7ff61ac78668ebc91155;p=perl%2Fmodules%2FTest-Leaner.git diff --git a/lib/Test/Leaner.pm b/lib/Test/Leaner.pm index 4f53275..9e39fe5 100644 --- a/lib/Test/Leaner.pm +++ b/lib/Test/Leaner.pm @@ -35,7 +35,7 @@ sub SKIP_ALL () { -2 } BEGIN { if (THREADSAFE) { - threads::shared::share($_) for $plan, $test, $failed, $no_diag; + threads::shared::share($_) for $plan, $test, $failed, $no_diag, $done_testing; } lock $plan if THREADSAFE; @@ -143,6 +143,7 @@ sub import { push @imports, @{ $_[$i+1] }; $splice = 2; } elsif ($item eq 'no_diag') { + lock $plan if THREADSAFE; $no_diag = 1; $splice = 1; } @@ -183,6 +184,8 @@ sub skip { } for (1 .. $count) { + ++$test; + my $skip_str = "ok $test # skip"; if (defined $reason) { sanitize_comment($reason); @@ -191,8 +194,6 @@ sub skip { local $\; print $TAP_STREAM "$skip_str\n"; - - $test++; } no warnings 'exiting';