]> git.vpit.fr Git - perl/modules/autovivification.git/blob - t/30-array.t
Handle array and hash slices
[perl/modules/autovivification.git] / t / 30-array.t
1 #!perl -T
2
3 use strict;
4 use warnings;
5
6 use Test::More tests => 9 * 3 * 290;
7
8 use lib 't/lib';
9 use autovivification::TestCases;
10
11 while (<DATA>) {
12  1 while chomp;
13  next unless /#/;
14  testcase_ok($_, '@');
15 }
16
17 __DATA__
18
19 --- fetch ---
20
21 $x # $x->[$N[0]] # '', undef, [ ]
22 $x # $x->[$N[0]] # '', undef, undef #
23 $x # $x->[$N[0]] # '', undef, undef # +fetch
24 $x # $x->[$N[0]] # '', undef, [ ] # +exists
25 $x # $x->[$N[0]] # '', undef, [ ] # +delete
26 $x # $x->[$N[0]] # '', undef, [ ] # +store
27
28 $x # $x->[$N[0]] # '', undef, [ ] # -fetch
29 $x # $x->[$N[0]] # '', undef, [ ] # +fetch -fetch
30 $x # $x->[$N[0]] # '', undef, undef # -fetch +fetch
31 $x # $x->[$N[0]] # '', undef, undef # +fetch -exists
32
33 $x # $x->[$N[0]] # qr/^Reference vivification forbidden/, undef, undef # +strict +fetch
34 $x # $x->[$N[0]] # '', undef, [ ] # +strict +exists
35 $x # $x->[$N[0]] # '', undef, [ ] # +strict +delete
36 $x # $x->[$N[0]] # '', undef, [ ] # +strict +store
37
38 $x # $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ]
39 $x # $x->[$N[0]]->[$N[1]] # '', undef, undef #
40 $x # $x->[$N[0]]->[$N[1]] # '', undef, undef # +fetch
41 $x # $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ] # +exists
42 $x # $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ] # +delete
43 $x # $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ] # +store
44
45 $x # $x->[$N[0]]->[$N[1]] # qr/^Reference vivification forbidden/, undef, undef # +strict +fetch
46 $x # $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ] # +strict +exists
47 $x # $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ] # +strict +delete
48 $x # $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ] # +strict +store
49
50 $x->[$N[0]] = 1 # $x->[$N[0]] # '', 1, [ 1 ] # +fetch
51 $x->[$N[0]] = 1 # $x->[$N[1]] # '', undef, [ 1 ] # +fetch
52 $x->[$N[0]] = 1 # $x->[$N[0]] # '', 1, [ 1 ] # +exists
53 $x->[$N[0]] = 1 # $x->[$N[1]] # '', undef, [ 1 ] # +exists
54 $x->[$N[0]] = 1 # $x->[$N[0]] # '', 1, [ 1 ] # +delete
55 $x->[$N[0]] = 1 # $x->[$N[1]] # '', undef, [ 1 ] # +delete
56 $x->[$N[0]] = 1 # $x->[$N[0]] # '', 1, [ 1 ] # +store
57 $x->[$N[0]] = 1 # $x->[$N[1]] # '', undef, [ 1 ] # +store
58
59 $x->[$N[0]] = 1 # $x->[$N[0]] # '', 1, [ 1 ] # +strict +fetch
60 $x->[$N[0]] = 1 # $x->[$N[1]] # '', undef, [ 1 ] # +strict +fetch
61 $x->[$N[0]] = 1 # $x->[$N[0]] # '', 1, [ 1 ] # +strict +exists
62 $x->[$N[0]] = 1 # $x->[$N[1]] # '', undef, [ 1 ] # +strict +exists
63 $x->[$N[0]] = 1 # $x->[$N[0]] # '', 1, [ 1 ] # +strict +delete
64 $x->[$N[0]] = 1 # $x->[$N[1]] # '', undef, [ 1 ] # +strict +delete
65 $x->[$N[0]] = 1 # $x->[$N[0]] # '', 1, [ 1 ] # +strict +store
66 $x->[$N[0]] = 1 # $x->[$N[1]] # '', undef, [ 1 ] # +strict +store
67
68 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +fetch
69 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ] # +fetch
70 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ] ] # +fetch
71 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +exists
72 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ] # +exists
73 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +exists
74 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +delete
75 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ] # +delete
76 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +delete
77 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +store
78 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ] # +store
79 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +store
80
81 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +strict +fetch
82 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ] # +strict +fetch
83 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] # qr/^Reference vivification forbidden/, undef, [ [ undef, 1 ] ] # +strict +fetch
84 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +strict +exists
85 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ] # +strict +exists
86 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +strict +exists
87 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +strict +delete
88 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ] # +strict +delete
89 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +strict +delete
90 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +strict +store
91 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ] # +strict +store
92 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +strict +store
93
94 --- aliasing ---
95
96 $x # 1 for $x->[$N[0]]; () # '', undef, [ undef ]
97 $x # 1 for $x->[$N[0]]; () # '', undef, [ undef ] #
98 $x # 1 for $x->[$N[0]]; () # '', undef, [ undef ] # +fetch
99 $x # 1 for $x->[$N[0]]; () # '', undef, [ undef ] # +exists
100 $x # 1 for $x->[$N[0]]; () # '', undef, [ undef ] # +delete
101 $x # 1 for $x->[$N[0]]; () # qr/^Can't vivify reference/, undef, undef # +store
102
103 $x # $_ = 1 for $x->[$N[0]]; () # '', undef, [ 1 ]
104 $x # $_ = 1 for $x->[$N[0]]; () # '', undef, [ 1 ] #
105 $x # $_ = 1 for $x->[$N[0]]; () # '', undef, [ 1 ] # +fetch
106 $x # $_ = 1 for $x->[$N[0]]; () # '', undef, [ 1 ] # +exists
107 $x # $_ = 1 for $x->[$N[0]]; () # '', undef, [ 1 ] # +delete
108 $x # $_ = 1 for $x->[$N[0]]; () # qr/^Can't vivify reference/, undef, undef # +store
109
110 $x->[$N[0]] = 1 # 1 for $x->[$N[0]]; () # '', undef, [ 1 ] # +fetch
111 $x->[$N[0]] = 1 # 1 for $x->[$N[1]]; () # '', undef, [ 1, undef ] # +fetch
112 $x->[$N[0]] = 1 # 1 for $x->[$N[0]]; () # '', undef, [ 1 ] # +exists
113 $x->[$N[0]] = 1 # 1 for $x->[$N[1]]; () # '', undef, [ 1, undef ] # +exists
114 $x->[$N[0]] = 1 # 1 for $x->[$N[0]]; () # '', undef, [ 1 ] # +delete
115 $x->[$N[0]] = 1 # 1 for $x->[$N[1]]; () # '', undef, [ 1, undef ] # +delete
116 $x->[$N[0]] = 1 # 1 for $x->[$N[0]]; () # '', undef, [ 1 ] # +store
117 $x->[$N[0]] = 1 # 1 for $x->[$N[1]]; () # '', undef, [ 1, undef ] # +store
118
119 --- dereferencing ---
120
121 $x # no warnings 'uninitialized'; my @a = @$x; () # ($strict ? qr/^Can't use an undefined value as an ARRAY reference/ : ''), undef, undef
122 $x # no warnings 'uninitialized'; my @a = @$x; () # ($strict ? qr/^Can't use an undefined value as an ARRAY reference/ : ''), undef, undef #
123 $x # no warnings 'uninitialized'; my @a = @$x; () # ($strict ? qr/^Can't use an undefined value as an ARRAY reference/ : ''), undef, undef # +fetch
124 $x # no warnings 'uninitialized'; my @a = @$x; () # ($strict ? qr/^Can't use an undefined value as an ARRAY reference/ : ''), undef, undef # +exists
125 $x # no warnings 'uninitialized'; my @a = @$x; () # ($strict ? qr/^Can't use an undefined value as an ARRAY reference/ : ''), undef, undef # +delete
126 $x # no warnings 'uninitialized'; my @a = @$x; () # ($strict ? qr/^Can't use an undefined value as an ARRAY reference/ : ''), undef, undef # +store
127
128 $x->[$N[0]] = 1 # my @a = @$x; () # '', undef, [ 1 ] # +fetch
129 $x->[$N[0]] = 1 # my @a = @$x; () # '', undef, [ 1 ] # +exists
130 $x->[$N[0]] = 1 # my @a = @$x; () # '', undef, [ 1 ] # +delete
131 $x->[$N[0]] = 1 # my @a = @$x; () # '', undef, [ 1 ] # +store
132
133 --- slice ---
134
135 $x # my @a = @$x[$N[0], $N[1]]; \@a # '', [ undef, undef ], [ ]
136 $x # my @a = @$x[$N[0], $N[1]]; \@a # '', [ undef, undef ], undef #
137 $x # my @a = @$x[$N[0], $N[1]]; \@a # '', [ undef, undef ], undef # +fetch
138 $x # my @a = @$x[$N[0], $N[1]]; \@a # '', [ undef, undef ], [ ] # +exists
139 $x # my @a = @$x[$N[0], $N[1]]; \@a # '', [ undef, undef ], [ ] # +delete
140 $x # my @a = @$x[$N[0], $N[1]]; \@a # '', [ undef, undef ], [ ] # +store
141
142 $x->[$N[1]] = 0 # my @a = @$x[$N[0], $N[1]]; \@a # '', [ undef, 0 ], [ undef, 0 ] # +fetch
143
144 $x # @$x[$N[0], $N[1]] = (1, 2); () # '', undef, [ 1, 2 ]
145 $x # @$x[$N[0], $N[1]] = (1, 2); () # '', undef, [ 1, 2 ] #
146 $x # @$x[$N[0], $N[1]] = (1, 2); () # '', undef, [ 1, 2 ] # +fetch
147 $x # @$x[$N[0], $N[1]] = (1, 2); () # '', undef, [ 1, 2 ] # +exists
148 $x # @$x[$N[0], $N[1]] = (1, 2); () # '', undef, [ 1, 2 ] # +delete
149 $x # @$x[$N[0], $N[1]] = (1, 2); () # qr/^Can't vivify reference/, undef, undef # +store
150
151 $x->[$N[0]] = 0 # @$x[$N[0], $N[1]] = (1, 2); () # '', undef, [ 1, 2 ] # +store
152 $x->[$N[2]] = 0 # @$x[$N[0], $N[1]] = (1, 2); () # '', undef, [ 1, 2, 0 ] # +store
153 $x->[$N[0]] = 0, $x->[$N[1]] = 0 # @$x[$N[0], $N[1]] = (1, 2); () # '', undef, [ 1, 2 ] # +store
154
155 --- exists ---
156
157 $x # exists $x->[$N[0]] # '', '', [ ]
158 $x # exists $x->[$N[0]] # '', '', undef #
159 $x # exists $x->[$N[0]] # '', '', [ ] # +fetch
160 $x # exists $x->[$N[0]] # '', '', undef # +exists
161 $x # exists $x->[$N[0]] # '', '', [ ] # +delete
162 $x # exists $x->[$N[0]] # '', '', [ ] # +store
163
164 $x # exists $x->[$N[0]] # '', '', [ ] # +strict +fetch
165 $x # exists $x->[$N[0]] # qr/^Reference vivification forbidden/, undef, undef # +strict +exists
166 $x # exists $x->[$N[0]] # '', '', [ ] # +strict +delete
167 $x # exists $x->[$N[0]] # '', '', [ ] # +strict +store
168
169 $x # exists $x->[$N[0]]->[$N[1]] # '', '', [ [ ] ]
170 $x # exists $x->[$N[0]]->[$N[1]] # '', '', undef #
171 $x # exists $x->[$N[0]]->[$N[1]] # '', '', [ [ ] ] # +fetch
172 $x # exists $x->[$N[0]]->[$N[1]] # '', '', undef # +exists
173 $x # exists $x->[$N[0]]->[$N[1]] # '', '', [ [ ] ] # +delete
174 $x # exists $x->[$N[0]]->[$N[1]] # '', '', [ [ ] ] # +store
175
176 $x # exists $x->[$N[0]]->[$N[1]] # '', '', [ [ ] ] # +strict +fetch
177 $x # exists $x->[$N[0]]->[$N[1]] # qr/^Reference vivification forbidden/, undef, undef # +strict +exists
178 $x # exists $x->[$N[0]]->[$N[1]] # '', '', [ [ ] ] # +strict +delete
179 $x # exists $x->[$N[0]]->[$N[1]] # '', '', [ [ ] ] # +strict +store
180
181 $x->[$N[0]] = 1 # exists $x->[$N[0]] # '', 1, [ 1 ] # +fetch
182 $x->[$N[0]] = 1 # exists $x->[$N[1]] # '', '', [ 1 ] # +fetch
183 $x->[$N[0]] = 1 # exists $x->[$N[0]] # '', 1, [ 1 ] # +exists
184 $x->[$N[0]] = 1 # exists $x->[$N[1]] # '', '', [ 1 ] # +exists
185 $x->[$N[0]] = 1 # exists $x->[$N[0]] # '', 1, [ 1 ] # +delete
186 $x->[$N[0]] = 1 # exists $x->[$N[1]] # '', '', [ 1 ] # +delete
187 $x->[$N[0]] = 1 # exists $x->[$N[0]] # '', 1, [ 1 ] # +store
188 $x->[$N[0]] = 1 # exists $x->[$N[1]] # '', '', [ 1 ] # +store
189
190 $x->[$N[0]] = 1 # exists $x->[$N[0]] # '', 1, [ 1 ] # +strict +fetch
191 $x->[$N[0]] = 1 # exists $x->[$N[1]] # '', '', [ 1 ] # +strict +fetch
192 $x->[$N[0]] = 1 # exists $x->[$N[0]] # '', 1, [ 1 ] # +strict +exists
193 $x->[$N[0]] = 1 # exists $x->[$N[1]] # '', '', [ 1 ] # +strict +exists
194 $x->[$N[0]] = 1 # exists $x->[$N[0]] # '', 1, [ 1 ] # +strict +delete
195 $x->[$N[0]] = 1 # exists $x->[$N[1]] # '', '', [ 1 ] # +strict +delete
196 $x->[$N[0]] = 1 # exists $x->[$N[0]] # '', 1, [ 1 ] # +strict +store
197 $x->[$N[0]] = 1 # exists $x->[$N[1]] # '', '', [ 1 ] # +strict +store
198
199 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +fetch
200 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[3]] # '', '', [ [ undef, 1 ] ] # +fetch
201 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[2]]->[$N[3]] # '', '', [ [ undef, 1 ], undef, [ ] ] # +fetch
202 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +exists
203 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[3]] # '', '', [ [ undef, 1 ] ] # +exists
204 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[2]]->[$N[3]] # '', '', [ [ undef, 1 ] ] # +exists
205 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +delete
206 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[3]] # '', '', [ [ undef, 1 ] ] # +delete
207 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[2]]->[$N[3]] # '', '', [ [ undef, 1 ], undef, [ ] ] # +delete
208 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +store
209 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[3]] # '', '', [ [ undef, 1 ] ] # +store
210 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[2]]->[$N[3]] # '', '', [ [ undef, 1 ], undef, [ ] ] # +store
211
212 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +strict +fetch
213 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[3]] # '', '', [ [ undef, 1 ] ] # +strict +fetch
214 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[2]]->[$N[3]] # '', '', [ [ undef, 1 ], undef, [ ] ] # +strict +fetch
215 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +strict +exists
216 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[3]] # '', '', [ [ undef, 1 ] ] # +strict +exists
217 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[2]]->[$N[3]] # qr/^Reference vivification forbidden/, undef, [ [ undef, 1 ] ] # +strict +exists
218 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +strict +delete
219 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[3]] # '', '', [ [ undef, 1 ] ] # +strict +delete
220 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[2]]->[$N[3]] # '', '', [ [ undef, 1 ], undef, [ ] ] # +strict +delete
221 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +strict +store
222 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[3]] # '', '', [ [ undef, 1 ] ] # +strict +store
223 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[2]]->[$N[3]] # '', '', [ [ undef, 1 ], undef, [ ] ] # +strict +store
224
225 --- delete ---
226
227 $x # delete $x->[$N[0]] # '', undef, [ ]
228 $x # delete $x->[$N[0]] # '', undef, undef #
229 $x # delete $x->[$N[0]] # '', undef, [ ] # +fetch
230 $x # delete $x->[$N[0]] # '', undef, [ ] # +exists
231 $x # delete $x->[$N[0]] # '', undef, undef # +delete
232 $x # delete $x->[$N[0]] # '', undef, [ ] # +store
233
234 $x # delete $x->[$N[0]] # '', undef, [ ] # +strict +fetch
235 $x # delete $x->[$N[0]] # '', undef, [ ] # +strict +exists
236 $x # delete $x->[$N[0]] # qr/^Reference vivification forbidden/, undef, undef # +strict +delete
237 $x # delete $x->[$N[0]] # '', undef, [ ] # +strict +store
238
239 $x # delete $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ]
240 $x # delete $x->[$N[0]]->[$N[1]] # '', undef, undef #
241 $x # delete $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ] # +fetch
242 $x # delete $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ] # +exists
243 $x # delete $x->[$N[0]]->[$N[1]] # '', undef, undef # +delete
244 $x # delete $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ] # +store
245
246 $x # delete $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ] # +strict +fetch
247 $x # delete $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ] # +strict +exists
248 $x # delete $x->[$N[0]]->[$N[1]] # qr/^Reference vivification forbidden/, undef, undef # +strict +delete
249 $x # delete $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ] # +strict +store
250
251 $x->[$N[0]] = 1 # delete $x->[$N[0]] # '', 1, [ ] # +fetch
252 $x->[$N[0]] = 1 # delete $x->[$N[1]] # '', undef, [ 1 ] # +fetch
253 $x->[$N[0]] = 1 # delete $x->[$N[0]] # '', 1, [ ] # +exists
254 $x->[$N[0]] = 1 # delete $x->[$N[1]] # '', undef, [ 1 ] # +exists
255 $x->[$N[0]] = 1 # delete $x->[$N[0]] # '', 1, [ ] # +delete
256 $x->[$N[0]] = 1 # delete $x->[$N[1]] # '', undef, [ 1 ] # +delete
257 $x->[$N[0]] = 1 # delete $x->[$N[0]] # '', 1, [ ] # +store
258 $x->[$N[0]] = 1 # delete $x->[$N[1]] # '', undef, [ 1 ] # +store
259
260 $x->[$N[0]] = 1 # delete $x->[$N[0]] # '', 1, [ ] # +strict +fetch
261 $x->[$N[0]] = 1 # delete $x->[$N[1]] # '', undef, [ 1 ] # +strict +fetch
262 $x->[$N[0]] = 1 # delete $x->[$N[0]] # '', 1, [ ] # +strict +exists
263 $x->[$N[0]] = 1 # delete $x->[$N[1]] # '', undef, [ 1 ] # +strict +exists
264 $x->[$N[0]] = 1 # delete $x->[$N[0]] # '', 1, [ ] # +strict +delete
265 $x->[$N[0]] = 1 # delete $x->[$N[1]] # '', undef, [ 1 ] # +strict +delete
266 $x->[$N[0]] = 1 # delete $x->[$N[0]] # '', 1, [ ] # +strict +store
267 $x->[$N[0]] = 1 # delete $x->[$N[1]] # '', undef, [ 1 ] # +strict +store
268
269 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[1]] # '', 1, [ [ ] ] # +fetch
270 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ]# +fetch
271 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +fetch
272 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[1]] # '', 1, [ [ ] ] # +exists
273 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ]# +exists
274 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +exists
275 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[1]] # '', 1, [ [ ] ] # +delete
276 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ]# +delete
277 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ] ]# +delete
278 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[1]] # '', 1, [ [ ] ] # +store
279 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ]# +store
280 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +store
281
282 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[1]] # '', 1, [ [ ] ] # +strict +fetch
283 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ] # +strict +fetch
284 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ], undef, [ ] ]# +strict +fetch
285 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[1]] # '', 1, [ [ ] ] # +strict +exists
286 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ] # +strict +exists
287 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ], undef, [ ] ]# +strict +exists
288 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[1]] # '', 1, [ [ ] ] # +strict +delete
289 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ] # +strict +delete
290 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[2]]->[$N[3]] # qr/^Reference vivification forbidden/, undef, [ [ undef, 1 ] ] # +strict +delete
291 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[1]] # '', 1, [ [ ] ] # +strict +store
292 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ] # +strict +store
293 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ], undef, [ ] ]# +strict +store
294
295 --- store ---
296
297 $x # $x->[$N[0]] = 1 # '', 1, [ 1 ]
298 $x # $x->[$N[0]] = 1 # '', 1, [ 1 ] #
299 $x # $x->[$N[0]] = 1 # '', 1, [ 1 ] # +fetch
300 $x # $x->[$N[0]] = 1 # '', 1, [ 1 ] # +exists
301 $x # $x->[$N[0]] = 1 # '', 1, [ 1 ] # +delete
302 $x # $x->[$N[0]] = 1 # qr/^Can't vivify reference/, undef, undef # +store
303
304 $x # $x->[$N[0]] = 1 # '', 1, [ 1 ] # +strict +fetch
305 $x # $x->[$N[0]] = 1 # '', 1, [ 1 ] # +strict +exists
306 $x # $x->[$N[0]] = 1 # '', 1, [ 1 ] # +strict +delete
307 $x # $x->[$N[0]] = 1 # qr/^Reference vivification forbidden/, undef, undef # +strict +store
308
309 $x # $x->[$N[0]]->[$N[1]] = 1 # '', 1, [ [ undef, 1 ] ]
310 $x # $x->[$N[0]]->[$N[1]] = 1 # '', 1, [ [ undef, 1 ] ] #
311 $x # $x->[$N[0]]->[$N[1]] = 1 # '', 1, [ [ undef, 1 ] ] # +fetch
312 $x # $x->[$N[0]]->[$N[1]] = 1 # '', 1, [ [ undef, 1 ] ] # +exists
313 $x # $x->[$N[0]]->[$N[1]] = 1 # '', 1, [ [ undef, 1 ] ] # +delete
314 $x # $x->[$N[0]]->[$N[1]] = 1 # qr/^Can't vivify reference/, undef, undef # +store
315
316 $x # $x->[$N[0]]->[$N[1]] = 1 # '', 1, [ [ undef, 1 ] ] # +strict +fetch
317 $x # $x->[$N[0]]->[$N[1]] = 1 # '', 1, [ [ undef, 1 ] ] # +strict +exists
318 $x # $x->[$N[0]]->[$N[1]] = 1 # '', 1, [ [ undef, 1 ] ] # +strict +delete
319 $x # $x->[$N[0]]->[$N[1]] = 1 # qr/^Reference vivification forbidden/, undef, undef # +strict +store
320
321 $x->[$N[0]] = 1 # $x->[$N[0]] = 2 # '', 2, [ 2 ] # +fetch
322 $x->[$N[0]] = 1 # $x->[$N[1]] = 2 # '', 2, [ 1, 2 ] # +fetch
323 $x->[$N[0]] = 1 # $x->[$N[0]] = 2 # '', 2, [ 2 ] # +exists
324 $x->[$N[0]] = 1 # $x->[$N[1]] = 2 # '', 2, [ 1, 2 ] # +exists
325 $x->[$N[0]] = 1 # $x->[$N[0]] = 2 # '', 2, [ 2 ] # +delete
326 $x->[$N[0]] = 1 # $x->[$N[1]] = 2 # '', 2, [ 1, 2 ] # +delete
327 $x->[$N[0]] = 1 # $x->[$N[0]] = 2 # '', 2, [ 2 ] # +store
328 $x->[$N[0]] = 1 # $x->[$N[1]] = 2 # '', 2, [ 1, 2 ] # +store
329
330 $x->[$N[0]] = 1 # $x->[$N[0]] = 2 # '', 2, [ 2 ] # +strict +fetch
331 $x->[$N[0]] = 1 # $x->[$N[1]] = 2 # '', 2, [ 1, 2 ] # +strict +fetch
332 $x->[$N[0]] = 1 # $x->[$N[0]] = 2 # '', 2, [ 2 ] # +strict +exists
333 $x->[$N[0]] = 1 # $x->[$N[1]] = 2 # '', 2, [ 1, 2 ] # +strict +exists
334 $x->[$N[0]] = 1 # $x->[$N[0]] = 2 # '', 2, [ 2 ] # +strict +delete
335 $x->[$N[0]] = 1 # $x->[$N[1]] = 2 # '', 2, [ 1, 2 ] # +strict +delete
336 $x->[$N[0]] = 1 # $x->[$N[0]] = 2 # '', 2, [ 2 ] # +strict +store
337 $x->[$N[0]] = 1 # $x->[$N[1]] = 2 # '', 2, [ 1, 2 ] # +strict +store
338
339 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] = 2 # '', 2, [ [ undef, 2 ] ] # +fetch
340 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +fetch
341 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] = 2 # '', 2, [ [ undef, 1 ], undef, [ undef, undef, undef, 2 ] ] # +fetch
342 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] = 2 # '', 2, [ [ undef, 2 ] ] # +exists
343 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +exists
344 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] = 2 # '', 2, [ [ undef, 1 ], undef, [ undef, undef, undef, 2 ] ] # +exists
345 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] = 2 # '', 2, [ [ undef, 2 ] ] # +delete
346 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +delete
347 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] = 2 # '', 2, [ [ undef, 1 ], undef, [ undef, undef, undef, 2 ] ] # +delete
348 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] = 2 # '', 2, [ [ undef, 2 ] ] # +store
349 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +store
350 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] = 2 # qr/^Can't vivify reference/, undef, [ [ undef, 1 ] ] # +store
351
352 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] = 2 # '', 2, [ [ undef, 2 ] ] # +strict +fetch
353 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +strict +fetch
354 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] = 2 # '', 2, [ [ undef, 1 ], undef, [ undef, undef, undef, 2 ] ] # +strict +fetch
355 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] = 2 # '', 2, [ [ undef, 2 ] ] # +strict +exists
356 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +strict +exists
357 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] = 2 # '', 2, [ [ undef, 1 ], undef, [ undef, undef, undef, 2 ] ] # +strict +exists
358 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] = 2 # '', 2, [ [ undef, 2 ] ] # +strict +delete
359 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +strict +delete
360 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] = 2 # '', 2, [ [ undef, 1 ], undef, [ undef, undef, undef, 2 ] ] # +strict +delete
361 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] = 2 # '', 2, [ [ undef, 2 ] ] # +strict +store
362 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +strict +store
363 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] = 2 # qr/^Reference vivification forbidden/, undef, [ [ undef, 1 ] ] # +strict +store