X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=blobdiff_plain;f=t%2F21-bad.t;h=09157e98c66d668630eaab0699b58f3e09fee44f;hp=6852426a69e536872c7571929d4315bd3ea3736d;hb=ce2df2b3143e49d1d1531f6f76e270b973dffad2;hpb=94aa495eddd4c48c51cebabae453a4b3ce7c0ab2 diff --git a/t/21-bad.t b/t/21-bad.t index 6852426..09157e9 100644 --- a/t/21-bad.t +++ b/t/21-bad.t @@ -11,12 +11,14 @@ use warnings; my ($tests, $reports); BEGIN { - $tests = 61; - $reports = 69; + $tests = 70; + $reports = 82; } use Test::More tests => 3 * (4 * $tests + $reports) + 4; +BEGIN { delete $ENV{PERL_INDIRECT_PM_DISABLE} } + my ($obj, $x); our ($y, $bloop); @@ -96,7 +98,10 @@ SKIP: } } +SKIP: { + skip 'No space tests on perl 5.11' => 4 + @expected + if $] >= 5.011 and $] < 5.012; my $code = $code; $code =~ s/\$/\$ \n\t /g; @@ -366,6 +371,38 @@ Hlagh->new(meh $x) ---- [ 'meh', '$x' ] #### +$obj = "apple ${\(new Hlagh)} pear" +---- +[ 'new', 'Hlagh' ] +#### +$obj = "apple @{[new Hlagh]} pear" +---- +[ 'new', 'Hlagh' ] +#### +$obj = "apple ${\(new $x)} pear" +---- +[ 'new', '$x' ] +#### +$obj = "apple @{[new $x]} pear" +---- +[ 'new', '$x' ] +#### +$obj = "apple ${\(new $y)} pear" +---- +[ 'new', '$y' ] +#### +$obj = "apple @{[new $y]} pear" +---- +[ 'new', '$y' ] +#### +$obj = "apple ${\(new $x qq|${\(stuff $y)}|)} pear" +---- +[ 'stuff', '$y' ], [ 'new', '$x' ] +#### +$obj = "apple @{[new $x qq|@{[stuff $y]}|]} pear" +---- +[ 'stuff', '$y' ], [ 'new', '$x' ] +#### meh { }; ---- [ 'meh', '{' ] @@ -402,3 +439,7 @@ meh { feh $y; 1; }; meh { feh $x; 1; } new Hlagh, feh $y; ---- [ 'feh', '$x' ], [ 'new', 'Hlagh' ], [ 'feh', '$y' ], [ 'meh', '{' ] +#### +$obj = "apple @{[new { feh $x; meh $y; 1 }]} pear" +---- +[ 'feh', '$x' ], [ 'meh', '$y' ], [ 'new', '{' ]