X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=blobdiff_plain;f=t%2F21-bad.t;h=0d3b48d96a3f81abe21a73e361595fc19e387381;hp=5984ef03ba031984995b00508c9d464162b7ba57;hb=07fb4eb28539b53578b1421e348c12c921d180f1;hpb=f136bf535929d8e3d552f0e1c28e44bcc7b5c006 diff --git a/t/21-bad.t b/t/21-bad.t index 5984ef0..0d3b48d 100644 --- a/t/21-bad.t +++ b/t/21-bad.t @@ -11,8 +11,8 @@ use warnings; my ($tests, $reports); BEGIN { - $tests = 82; - $reports = 94; + $tests = 84; + $reports = 96; } use Test::More tests => 3 * (4 * $tests + $reports) + 4; @@ -101,7 +101,7 @@ SKIP: SKIP: { skip 'No space tests on perl 5.11' => 4 + @expected - if $] >= 5.011 and $] < 5.012; + if "$]" >= 5.011 and "$]" < 5.012; my $code = $code; $code =~ s/\$/\$ \n\t /g; @@ -219,7 +219,7 @@ $obj = new $x qr{foo\s+bar}, 1 .. 1; ---- [ 'new', '$x' ] #### -$obj = new $x(qw/bar baz/); +$obj = new $x(qw); ---- [ 'new', '$x' ] #### @@ -280,15 +280,15 @@ meh $y 1, 2; meh $y, 1, 2; ---- [ 'meh', '$y' ] -#### $] < 5.010 # use feature 'state'; state $z +#### "$]" < 5.010 # use feature 'state'; state $z meh $z; ---- [ 'meh', '$z' ] -#### $] < 5.010 # use feature 'state'; state $z +#### "$]" < 5.010 # use feature 'state'; state $z meh $z 1, 2; ---- [ 'meh', '$z' ] -#### $] < 5.010 # use feature 'state'; state $z +#### "$]" < 5.010 # use feature 'state'; state $z meh $z, 1, 2; ---- [ 'meh', '$z' ] @@ -491,3 +491,13 @@ meh { feh $x; 1; } new Hlagh, feh $y; $obj = "apple @{[new { feh $x; meh $y; 1 }]} pear" ---- [ 'feh', '$x' ], [ 'meh', '$y' ], [ 'new', '{' ] +#### +package __PACKAGE_; +new __PACKAGE_; +---- +[ 'new', '__PACKAGE_' ] +#### +package __PACKAGE___; +new __PACKAGE___; +---- +[ 'new', '__PACKAGE___' ]