From: Father Chrysostomos Date: Fri, 14 Sep 2012 17:19:58 +0000 (-0700) Subject: method.t: Test more method-BLOCK edge cases X-Git-Tag: upstream/5.20.0~5429 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bfde49d45e9457b1d8a9e18b55d5b0c7615ddcd6;p=platform%2Fupstream%2Fperl.git method.t: Test more method-BLOCK edge cases --- diff --git a/t/op/method.t b/t/op/method.t index 09f6ee3..ff39231 100644 --- a/t/op/method.t +++ b/t/op/method.t @@ -13,7 +13,7 @@ BEGIN { use strict; no warnings 'once'; -plan(tests => 98); +plan(tests => 101); @A::ISA = 'B'; @B::ISA = 'C'; @@ -417,3 +417,15 @@ eval { () = undef; new {} }; like $@, qr/^Can't call method "new" without a package or object reference/, 'Err msg from new{} when stack contains undef'; + +package egakacp { + our @ISA = 'ASI'; + sub ASI::m { shift; "@_" }; + my @a = (bless([]), 'arg'); + my $r = SUPER::m{@a}; + ::is $r, 'arg', 'method{@array}'; + $r = SUPER::m{}@a; + ::is $r, 'arg', 'method{}@array'; + $r = SUPER::m{@a}"b"; + ::is $r, 'arg b', 'method{@array}$more_args'; +}