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