X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=blobdiff_plain;f=t%2F20-good.t;h=e04ee9d34c04c0a253e2d1e0e3b35f938e437249;hp=85f1900ddbe8e7133b82a1fab3438c9f749ae643;hb=c88f53009246bbc1af1789f746acc5d841fc0ae8;hpb=168f6fe27525f9fa5bd50b032e1e601b506abb16 diff --git a/t/20-good.t b/t/20-good.t index 85f1900..e04ee9d 100644 --- a/t/20-good.t +++ b/t/20-good.t @@ -9,7 +9,7 @@ package main; use strict; use warnings; -use Test::More tests => 86 * 8; +use Test::More tests => 101 * 8; BEGIN { delete $ENV{PERL_INDIRECT_PM_DISABLE} } @@ -155,7 +155,7 @@ $obj = $pkg -> ($cb) (); #### $obj = $pkg->$cb( $obj ); #### -$obj = $pkg->$cb(qw/foo bar baz/); +$obj = $pkg->$cb(qw); #### $obj = $pkg->$meth; #### @@ -192,9 +192,9 @@ meh $x, 1, 2; meh $y; #### meh $y, 1, 2; -#### $] < 5.010 # use feature 'state'; state $z +#### "$]" < 5.010 # use feature 'state'; state $z meh $z; -#### $] < 5.010 # use feature 'state'; state $z +#### "$]" < 5.010 # use feature 'state'; state $z meh $z, 1, 2; #### print; @@ -208,9 +208,9 @@ print $x "oh hai\n"; print $y; #### print $y "dongs\n"; -#### $] < 5.010 # use feature 'state'; state $z +#### "$]" < 5.010 # use feature 'state'; state $z print $z; -#### $] < 5.010 # use feature 'state'; state $z +#### "$]" < 5.010 # use feature 'state'; state $z print $z "hlagh\n"; #### print STDOUT "bananananananana\n"; @@ -253,17 +253,47 @@ s/foo/return; Hlagh->$meth/e; #### # local $_ = "bar"; s/foo/return; Hlagh->$meth/e; #### # local $_ = "foo"; -s/foo/return; $pkg->new/e; +s/foo/return; $x->new/e; #### # local $_ = "bar"; -s/foo/return; $pkg->new/e; +s/foo/return; $x->new/e; #### # local $_ = "foo"; -s/foo/return; $pkg->$cb/e; +s/foo/return; $x->$cb/e; #### # local $_ = "bar"; -s/foo/return; $pkg->$cb/e; +s/foo/return; $x->$cb/e; #### # local $_ = "foo"; -s/foo/return; $pkg->$meth/e; +s/foo/return; $x->$meth/e; #### # local $_ = "bar"; -s/foo/return; $pkg->$meth/e; +s/foo/return; $x->$meth/e; +#### # local $_ = "foo"; +s/foo/return; $y->new/e; +#### # local $_ = "bar"; +s/foo/return; $y->new/e; +#### # local $_ = "foo"; +s/foo/return; $y->$cb/e; +#### # local $_ = "bar"; +s/foo/return; $y->$cb/e; +#### # local $_ = "foo"; +s/foo/return; $y->$meth/e; +#### # local $_ = "bar"; +s/foo/return; $y->$meth/e; +#### +"foo" =~ /(?{Hlagh->new})/; +#### +"foo" =~ /(?{Hlagh->$cb})/; +#### +"foo" =~ /(?{Hlagh->$meth})/; +#### +"foo" =~ /(?{$x->new})/; +#### +"foo" =~ /(?{$x->$cb})/; +#### +"foo" =~ /(?{$x->$meth})/; +#### +"foo" =~ /(?{$y->new})/; +#### +"foo" =~ /(?{$y->$cb})/; +#### +"foo" =~ /(?{$y->$meth})/; #### exec $x $x, @a; ####