X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FPerl-Critic-Policy-Dynamic-NoIndirect.git;a=blobdiff_plain;f=t%2F10-basic.t;h=68715f2d72fa84638ea4ae3386b4cc1d2ed7ecbd;hp=29c2f103670bbdb913bdcb2dd3417f9fd88c8055;hb=fdfcb1cec5f258ed25e22c7d1fea67e03098b3fd;hpb=ba8eb2c0e9b3b9a75dc7fd128e722b1a0eef8b75 diff --git a/t/10-basic.t b/t/10-basic.t index 29c2f10..68715f2 100644 --- a/t/10-basic.t +++ b/t/10-basic.t @@ -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;