X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F21-array.t;h=dae28a42d16f04dcd3d609a49e43439b76611b39;hb=ddbfd527f4c54458985145aae3a837a8f5868551;hp=95bb8ff5bfea843030820ab04dcc5dc9df2e8dea;hpb=c242fc0347a4f52619f45807965c56a25db82cbd;p=perl%2Fmodules%2Fautovivification.git diff --git a/t/21-array.t b/t/21-array.t index 95bb8ff..dae28a4 100644 --- a/t/21-array.t +++ b/t/21-array.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 6 * 3 * 240; +use Test::More tests => 6 * 3 * 260; sub testcase { my ($var, $init, $code, $exp, $use, $global) = @_; @@ -148,6 +148,31 @@ $x->[0]->[1] = 1 # $x->[0]->[1] # '', 1, [ [ undef, 1 ] ] # +strict +store $x->[0]->[1] = 1 # $x->[0]->[3] # '', undef, [ [ undef, 1 ] ] # +strict +store $x->[0]->[1] = 1 # $x->[2]->[3] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +strict +store +--- aliasing --- + +$x # 1 for $x->[0]; () # '', undef, [ undef ] +$x # 1 for $x->[0]; () # '', undef, undef # +$x # 1 for $x->[0]; () # '', undef, undef # +fetch +$x # 1 for $x->[0]; () # '', undef, [ undef ] # +exists +$x # 1 for $x->[0]; () # '', undef, [ undef ] # +delete +$x # 1 for $x->[0]; () # '', undef, [ undef ] # +store + +$x # $_ = 1 for $x->[0]; () # '', undef, [ 1 ] +$x # $_ = 1 for $x->[0]; () # '', undef, undef # +$x # $_ = 1 for $x->[0]; () # '', undef, undef # +fetch +$x # $_ = 1 for $x->[0]; () # '', undef, [ 1 ] # +exists +$x # $_ = 1 for $x->[0]; () # '', undef, [ 1 ] # +delete +$x # $_ = 1 for $x->[0]; () # '', undef, [ 1 ] # +store + +$x->[0] = 1 # 1 for $x->[0]; () # '', undef, [ 1 ] # +fetch +$x->[0] = 1 # 1 for $x->[1]; () # '', undef, [ 1, undef ] # +fetch +$x->[0] = 1 # 1 for $x->[0]; () # '', undef, [ 1 ] # +exists +$x->[0] = 1 # 1 for $x->[1]; () # '', undef, [ 1, undef ] # +exists +$x->[0] = 1 # 1 for $x->[0]; () # '', undef, [ 1 ] # +delete +$x->[0] = 1 # 1 for $x->[1]; () # '', undef, [ 1, undef ] # +delete +$x->[0] = 1 # 1 for $x->[0]; () # '', undef, [ 1 ] # +store +$x->[0] = 1 # 1 for $x->[1]; () # '', undef, [ 1, undef ] # +store + --- exists --- $x # exists $x->[0] # '', '', [ ]