X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=blobdiff_plain;f=t%2F10-args.t;h=683b57e870432b020b8a4ab47d97ddcae2bdeec2;hp=4db490cd408f9dbfdd8e820fd8491de5ee0ea271;hb=7b0b52eea73aedd1cb0909d1c08766dc4782a5fb;hpb=36e1f9a23b073751223769b71f1e84643913e592 diff --git a/t/10-args.t b/t/10-args.t index 4db490c..683b57e 100644 --- a/t/10-args.t +++ b/t/10-args.t @@ -7,7 +7,7 @@ use Test::More tests => 4 + 1 + 1; sub expect { my ($pkg) = @_; - return qr/^Indirect\s+call\s+of\s+method\s+"new"\s+on\s+object\s+"$pkg"/; + return qr/^Indirect\s+call\s+of\s+method\s+"new"\s+on\s+object\s+"$pkg"\s+at\s+\(eval\s+\d+\)\s+line\s+\d+/; } { @@ -32,10 +32,10 @@ HERE eval <<'HERE'; die qq{shouldn't even compile\n}; no indirect ':fatal', hook => sub { die 'should not be called' }; - my $x = new Fatal; + my $x = new Croaked; $x = new NotReached; HERE - like $@, expect('Fatal'), 'croaks when :fatal is specified'; + like $@, expect('Croaked'), 'croaks when :fatal is specified'; } { @@ -46,5 +46,5 @@ HERE my $x = new Hooked; $x = new AlsoNotReached; HERE - is $@, "hook:Hooked:new\n", 'calls the specified hook'; + like $@, qr/^hook:Hooked:new:\(eval\s+\d+\):\d+$/, 'calls the specified hook'; }