]> git.vpit.fr Git - perl/modules/indirect.git/blobdiff - t/21-bad.t
Fix "meth meth" not being correctly reported
[perl/modules/indirect.git] / t / 21-bad.t
index c480d6c0a4720dca3a614caab688f33a6ba5da55..1d2fab9342529662108d811d04f89aab7b1f52d7 100644 (file)
@@ -9,14 +9,19 @@ package main;
 use strict;
 use warnings;
 
-use Test::More tests => 50 * 6 + 2;
+use Test::More tests => 52 * 6 + 2;
 
 my ($obj, $x);
 our ($y, $bloop);
 
 sub expect {
  my ($pkg) = @_;
- return qr/^warn:Indirect call of method "(?:new|meh|$pkg$pkg)" on object "(?:$pkg|newnew|\$(?:[xyz_\$]|(?:sploosh::)?sploosh|(?:main::)?bloop))"/
+ qr/^warn:Indirect\s+call\s+of\s+method\s+
+     "(?:new|meh|feh|$pkg$pkg)"
+     \s+on\s+object\s+
+     "(?:$pkg|newnew|feh|\$(?:[xyz_\$]|(?:sploosh::)?sploosh|(?:main::)?bloop))"
+     \s+at\s+\(eval\s+\d+\)\s+line\s+\d+
+   /x
 }
 
 {
@@ -191,6 +196,10 @@ $obj = new newnew;
 ####
 $obj = new newnew; # new newnew
 ####
+$obj = feh feh;
+####
+$obj = feh feh; # feh feh
+####
 new Hlagh (meh $x)
 ####
 Hlagh->new(meh $x)