X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F42-stress.t;fp=t%2F42-stress.t;h=bb31787c58457d52f1e740e6db4e813598a040d8;hb=a563bfdf922825ad97cb71f5498d5f038cacd9d2;hp=0000000000000000000000000000000000000000;hpb=eb4b05d5ad6eec232107b4688e59685bc54f7a65;p=perl%2Fmodules%2Findirect.git diff --git a/t/42-stress.t b/t/42-stress.t new file mode 100644 index 0000000..bb31787 --- /dev/null +++ b/t/42-stress.t @@ -0,0 +1,23 @@ +#!perl -T + +use strict; +use warnings; + +my $count; +BEGIN { $count = 1_000 } + +use Test::More tests => 2 * $count; + +for (1 .. $count) { + my @errs; + { + local $SIG{__WARN__} = sub { die @_ }; + eval q( + return; + no indirect hook => sub { push @errs, [ @_[0, 1, 3] ] }; + my $x = new Wut; + ); + } + is $@, '', "didn't croak at run $_"; + is_deeply \@errs, [ [ 'Wut', 'new', 4 ] ], "got the right data at run $_"; +}