X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FPerl-Critic-Policy-Dynamic-NoIndirect.git;a=blobdiff_plain;f=t%2F10-basic.t;fp=t%2F10-basic.t;h=29c2f103670bbdb913bdcb2dd3417f9fd88c8055;hp=a1b1885751979264c9d691fc8de2340506b76e35;hb=ba8eb2c0e9b3b9a75dc7fd128e722b1a0eef8b75;hpb=754541e0583f7da9be1ea92f0ea96be44b65cfaa diff --git a/t/10-basic.t b/t/10-basic.t index a1b1885..29c2f10 100644 --- a/t/10-basic.t +++ b/t/10-basic.t @@ -5,11 +5,11 @@ use warnings; my ($tests, $subtests); BEGIN { - $tests = 8; + $tests = 13; $subtests = 3; } -use Test::More tests => $tests + $subtests * 14; +use Test::More tests => $tests + $subtests * 21; use Perl::Critic::TestUtils qw/pcritique_with_violations/; @@ -77,6 +77,21 @@ my $y = new X; ---- [ 'new', 'X', 1, 9 ], [ 'new', 'X', 2, 9 ] #### +my $x = new + X; +---- +[ 'new', 'X', 1, 9 ] +#### +my $x = new + X new + X; +---- +[ 'new', 'X', 1, 9 ], [ 'new', 'X', 2, 4 ] +#### +my $x = new new; +---- +[ 'new', 'new', 1, 9 ] +#### our $obj; my $x = new $obj; ---- @@ -97,4 +112,16 @@ my $x = new $obj; my $y = new $obj; ---- [ 'new', '$obj', 2, 9 ], [ 'new', '$obj', 3, 9 ] - +#### +our $obj; +my $x = new + $obj; +---- +[ 'new', '$obj', 2, 9 ] +#### +our $obj; +my $x = new + $obj new + $obj; +---- +[ 'new', '$obj', 2, 9 ], [ 'new', '$obj', 3, 7 ]