X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLexical-Types.git;a=blobdiff_plain;f=t%2F81-threads-teardown.t;fp=t%2F81-threads-teardown.t;h=a46d678c3d85d187763a8669959c3f75d284c2fc;hp=7a5c2270268a3df0b335a154fc532d4b3a872bb9;hb=0c5eb4d19c4c97d9b26e6a3152e447d37db0a36e;hpb=edd9e21a17be0119fc8cdb76fd2d0d26cf913463 diff --git a/t/81-threads-teardown.t b/t/81-threads-teardown.t index 7a5c227..a46d678 100644 --- a/t/81-threads-teardown.t +++ b/t/81-threads-teardown.t @@ -4,12 +4,14 @@ use strict; use warnings; use lib 't/lib'; -use VPIT::TestHelpers; -use Lexical::Types::TestThreads; +use VPIT::TestHelpers ( + threads => [ 'Lexical::Types' => 'Lexical::Types::LT_THREADSAFE()' ], + 'run_perl', +); -use Test::More tests => 2; +use Test::Leaner tests => 2; -{ +SKIP: { my $status = run_perl <<' RUN'; { package IntX; package IntY; package IntZ; } my ($code, @expected); @@ -30,10 +32,11 @@ use Test::More tests => 2; $code += 256 if $code < 0; exit $code; RUN + skip RUN_PERL_FAILED() => 1 unless defined $status; is $status, 0, 'loading the pragma in a thread and using it outside doesn\'t segfault'; } -{ +SKIP: { my $status = run_perl <<' RUN'; use threads; BEGIN { require Lexical::Types; } @@ -48,5 +51,6 @@ use Test::More tests => 2; })->join; exit 0; RUN + skip RUN_PERL_FAILED() => 1 unless defined $status; is $status, 0, 'Lexical::Types can be loaded in eval STRING during global destruction at the end of a thread'; }