X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=blobdiff_plain;f=t%2F10-args.t;h=bacf850354c9860a801942be79fbaa946ba84168;hp=d7352955b295e46478be1e971a951d0711639e0c;hb=485841aab90380ffecbe0f217eb234a64f69bb25;hpb=540837c786e360ce093b9d1fcb93cf7614ac0307 diff --git a/t/10-args.t b/t/10-args.t index d735295..bacf850 100644 --- a/t/10-args.t +++ b/t/10-args.t @@ -3,7 +3,9 @@ use strict; use warnings; -use Test::More tests => 4 + 1 + 1; +use Test::More tests => 4 + 3 + 1; + +BEGIN { delete $ENV{PERL_INDIRECT_PM_DISABLE} } sub expect { my ($pkg) = @_; @@ -29,17 +31,17 @@ sub expect { is_deeply \@warns, [ ], 'no more warnings without arguments'; } -{ +for my $fatal (':fatal', 'FATAL', ':Fatal') { { local $SIG{__WARN__} = sub { die "warn:@_" }; - eval <<' HERE'; + eval <<" HERE"; die qq{shouldn't even compile\n}; - no indirect ':fatal', hook => sub { die 'should not be called' }; - my $x = new Croaked; - $x = new NotReached; + no indirect '$fatal', hook => sub { die 'should not be called' }; + my \$x = new Croaked; + \$x = new NotReached; HERE } - like $@, expect('Croaked'), 'croaks when :fatal is specified'; + like $@, expect('Croaked'), "croaks when $fatal is specified"; } {