]> git.vpit.fr Git - perl/modules/Perl-Critic-Policy-Dynamic-NoIndirect.git/blobdiff - t/10-basic.t
Fix not reporting multiple violations with the same method on the same line
[perl/modules/Perl-Critic-Policy-Dynamic-NoIndirect.git] / t / 10-basic.t
index 29c2f103670bbdb913bdcb2dd3417f9fd88c8055..68715f2d72fa84638ea4ae3386b4cc1d2ed7ecbd 100644 (file)
@@ -5,11 +5,11 @@ use warnings;
 
 my ($tests, $subtests);
 BEGIN {
- $tests    = 13;
+ $tests    = 15;
  $subtests = 3;
 }
 
-use Test::More tests => $tests + $subtests * 21;
+use Test::More tests => $tests + $subtests * 25;
 
 use Perl::Critic::TestUtils qw/pcritique_with_violations/;
 
@@ -72,6 +72,10 @@ my $x = new X    new X;
 ----
 [ 'new', 'X', 1, 9 ], [ 'new', 'X', 1, 18 ]
 ####
+my $x = new X    new Y;
+----
+[ 'new', 'X', 1, 9 ], [ 'new', 'Y', 1, 18 ]
+####
 my $x = new X;
 my $y = new X;
 ----
@@ -107,6 +111,11 @@ my $x = new $obj    new $obj;
 ----
 [ 'new', '$obj', 2, 9 ], [ 'new', '$obj', 2, 21 ]
 ####
+our ($o1, $o2);
+my $x = new $o1     new $o2;
+----
+[ 'new', '$o1', 2, 9 ], [ 'new', '$o2', 2, 21 ]
+####
 our $obj;
 my $x = new $obj;
 my $y = new $obj;