]> git.vpit.fr Git - perl/modules/autovivification.git/blob - t/30-array.t
This is 0.18
[perl/modules/autovivification.git] / t / 30-array.t
1 #!perl -T
2
3 use strict;
4 use warnings;
5
6 use lib 't/lib';
7 use Test::Leaner tests => 9 * 3 * 302;
8
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 $x # do_nothing($x->[$N[0]]); () # '', undef, [ ]
120 $x # do_nothing($x->[$N[0]]); () # '', undef, [ ] #
121 $x # do_nothing($x->[$N[0]]); () # '', undef, [ ] # +fetch
122 $x # do_nothing($x->[$N[0]]); () # '', undef, [ ] # +exists
123 $x # do_nothing($x->[$N[0]]); () # '', undef, [ ] # +delete
124 $x # do_nothing($x->[$N[0]]); () # qr/^Can't vivify reference/, undef, undef # +store
125
126 $x # set_arg($x->[$N[0]]); () # '', undef, [ 1 ]
127 $x # set_arg($x->[$N[0]]); () # '', undef, [ 1 ] #
128 $x # set_arg($x->[$N[0]]); () # '', undef, [ 1 ] # +fetch
129 $x # set_arg($x->[$N[0]]); () # '', undef, [ 1 ] # +exists
130 $x # set_arg($x->[$N[0]]); () # '', undef, [ 1 ] # +delete
131 $x # set_arg($x->[$N[0]]); () # qr/^Can't vivify reference/, undef, undef # +store
132
133 --- dereferencing ---
134
135 $x # no warnings 'uninitialized'; my @a = @$x; () # ($strict ? qr/^Can't use an undefined value as an ARRAY reference/ : ''), undef, undef
136 $x # no warnings 'uninitialized'; my @a = @$x; () # ($strict ? qr/^Can't use an undefined value as an ARRAY reference/ : ''), undef, undef #
137 $x # no warnings 'uninitialized'; my @a = @$x; () # ($strict ? qr/^Can't use an undefined value as an ARRAY reference/ : ''), undef, undef # +fetch
138 $x # no warnings 'uninitialized'; my @a = @$x; () # ($strict ? qr/^Can't use an undefined value as an ARRAY reference/ : ''), undef, undef # +exists
139 $x # no warnings 'uninitialized'; my @a = @$x; () # ($strict ? qr/^Can't use an undefined value as an ARRAY reference/ : ''), undef, undef # +delete
140 $x # no warnings 'uninitialized'; my @a = @$x; () # ($strict ? qr/^Can't use an undefined value as an ARRAY reference/ : ''), undef, undef # +store
141
142 $x->[$N[0]] = 1 # my @a = @$x; () # '', undef, [ 1 ] # +fetch
143 $x->[$N[0]] = 1 # my @a = @$x; () # '', undef, [ 1 ] # +exists
144 $x->[$N[0]] = 1 # my @a = @$x; () # '', undef, [ 1 ] # +delete
145 $x->[$N[0]] = 1 # my @a = @$x; () # '', undef, [ 1 ] # +store
146
147 --- slice ---
148
149 $x # my @a = @$x[$N[0], $N[1]]; \@a # '', [ undef, undef ], [ ]
150 $x # my @a = @$x[$N[0], $N[1]]; \@a # '', [ undef, undef ], undef #
151 $x # my @a = @$x[$N[0], $N[1]]; \@a # '', [ undef, undef ], undef # +fetch
152 $x # my @a = @$x[$N[0], $N[1]]; \@a # '', [ undef, undef ], [ ] # +exists
153 $x # my @a = @$x[$N[0], $N[1]]; \@a # '', [ undef, undef ], [ ] # +delete
154 $x # my @a = @$x[$N[0], $N[1]]; \@a # '', [ undef, undef ], [ ] # +store
155
156 $x->[$N[1]] = 0 # my @a = @$x[$N[0], $N[1]]; \@a # '', [ undef, 0 ], [ undef, 0 ] # +fetch
157
158 $x # @$x[$N[0], $N[1]] = (1, 2); () # '', undef, [ 1, 2 ]
159 $x # @$x[$N[0], $N[1]] = (1, 2); () # '', undef, [ 1, 2 ] #
160 $x # @$x[$N[0], $N[1]] = (1, 2); () # '', undef, [ 1, 2 ] # +fetch
161 $x # @$x[$N[0], $N[1]] = (1, 2); () # '', undef, [ 1, 2 ] # +exists
162 $x # @$x[$N[0], $N[1]] = (1, 2); () # '', undef, [ 1, 2 ] # +delete
163 $x # @$x[$N[0], $N[1]] = (1, 2); () # qr/^Can't vivify reference/, undef, undef # +store
164
165 $x->[$N[0]] = 0 # @$x[$N[0], $N[1]] = (1, 2); () # '', undef, [ 1, 2 ] # +store
166 $x->[$N[2]] = 0 # @$x[$N[0], $N[1]] = (1, 2); () # '', undef, [ 1, 2, 0 ] # +store
167 $x->[$N[0]] = 0, $x->[$N[1]] = 0 # @$x[$N[0], $N[1]] = (1, 2); () # '', undef, [ 1, 2 ] # +store
168
169 --- exists ---
170
171 $x # exists $x->[$N[0]] # '', '', [ ]
172 $x # exists $x->[$N[0]] # '', '', undef #
173 $x # exists $x->[$N[0]] # '', '', [ ] # +fetch
174 $x # exists $x->[$N[0]] # '', '', undef # +exists
175 $x # exists $x->[$N[0]] # '', '', [ ] # +delete
176 $x # exists $x->[$N[0]] # '', '', [ ] # +store
177
178 $x # exists $x->[$N[0]] # '', '', [ ] # +strict +fetch
179 $x # exists $x->[$N[0]] # qr/^Reference vivification forbidden/, undef, undef # +strict +exists
180 $x # exists $x->[$N[0]] # '', '', [ ] # +strict +delete
181 $x # exists $x->[$N[0]] # '', '', [ ] # +strict +store
182
183 $x # exists $x->[$N[0]]->[$N[1]] # '', '', [ [ ] ]
184 $x # exists $x->[$N[0]]->[$N[1]] # '', '', undef #
185 $x # exists $x->[$N[0]]->[$N[1]] # '', '', [ [ ] ] # +fetch
186 $x # exists $x->[$N[0]]->[$N[1]] # '', '', undef # +exists
187 $x # exists $x->[$N[0]]->[$N[1]] # '', '', [ [ ] ] # +delete
188 $x # exists $x->[$N[0]]->[$N[1]] # '', '', [ [ ] ] # +store
189
190 $x # exists $x->[$N[0]]->[$N[1]] # '', '', [ [ ] ] # +strict +fetch
191 $x # exists $x->[$N[0]]->[$N[1]] # qr/^Reference vivification forbidden/, undef, undef # +strict +exists
192 $x # exists $x->[$N[0]]->[$N[1]] # '', '', [ [ ] ] # +strict +delete
193 $x # exists $x->[$N[0]]->[$N[1]] # '', '', [ [ ] ] # +strict +store
194
195 $x->[$N[0]] = 1 # exists $x->[$N[0]] # '', 1, [ 1 ] # +fetch
196 $x->[$N[0]] = 1 # exists $x->[$N[1]] # '', '', [ 1 ] # +fetch
197 $x->[$N[0]] = 1 # exists $x->[$N[0]] # '', 1, [ 1 ] # +exists
198 $x->[$N[0]] = 1 # exists $x->[$N[1]] # '', '', [ 1 ] # +exists
199 $x->[$N[0]] = 1 # exists $x->[$N[0]] # '', 1, [ 1 ] # +delete
200 $x->[$N[0]] = 1 # exists $x->[$N[1]] # '', '', [ 1 ] # +delete
201 $x->[$N[0]] = 1 # exists $x->[$N[0]] # '', 1, [ 1 ] # +store
202 $x->[$N[0]] = 1 # exists $x->[$N[1]] # '', '', [ 1 ] # +store
203
204 $x->[$N[0]] = 1 # exists $x->[$N[0]] # '', 1, [ 1 ] # +strict +fetch
205 $x->[$N[0]] = 1 # exists $x->[$N[1]] # '', '', [ 1 ] # +strict +fetch
206 $x->[$N[0]] = 1 # exists $x->[$N[0]] # '', 1, [ 1 ] # +strict +exists
207 $x->[$N[0]] = 1 # exists $x->[$N[1]] # '', '', [ 1 ] # +strict +exists
208 $x->[$N[0]] = 1 # exists $x->[$N[0]] # '', 1, [ 1 ] # +strict +delete
209 $x->[$N[0]] = 1 # exists $x->[$N[1]] # '', '', [ 1 ] # +strict +delete
210 $x->[$N[0]] = 1 # exists $x->[$N[0]] # '', 1, [ 1 ] # +strict +store
211 $x->[$N[0]] = 1 # exists $x->[$N[1]] # '', '', [ 1 ] # +strict +store
212
213 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +fetch
214 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[3]] # '', '', [ [ undef, 1 ] ] # +fetch
215 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[2]]->[$N[3]] # '', '', [ [ undef, 1 ], undef, [ ] ] # +fetch
216 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +exists
217 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[3]] # '', '', [ [ undef, 1 ] ] # +exists
218 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[2]]->[$N[3]] # '', '', [ [ undef, 1 ] ] # +exists
219 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +delete
220 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[3]] # '', '', [ [ undef, 1 ] ] # +delete
221 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[2]]->[$N[3]] # '', '', [ [ undef, 1 ], undef, [ ] ] # +delete
222 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +store
223 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[3]] # '', '', [ [ undef, 1 ] ] # +store
224 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[2]]->[$N[3]] # '', '', [ [ undef, 1 ], undef, [ ] ] # +store
225
226 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +strict +fetch
227 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[3]] # '', '', [ [ undef, 1 ] ] # +strict +fetch
228 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[2]]->[$N[3]] # '', '', [ [ undef, 1 ], undef, [ ] ] # +strict +fetch
229 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +strict +exists
230 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[3]] # '', '', [ [ undef, 1 ] ] # +strict +exists
231 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[2]]->[$N[3]] # qr/^Reference vivification forbidden/, undef, [ [ undef, 1 ] ] # +strict +exists
232 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +strict +delete
233 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[3]] # '', '', [ [ undef, 1 ] ] # +strict +delete
234 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[2]]->[$N[3]] # '', '', [ [ undef, 1 ], undef, [ ] ] # +strict +delete
235 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[1]] # '', 1, [ [ undef, 1 ] ] # +strict +store
236 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[0]]->[$N[3]] # '', '', [ [ undef, 1 ] ] # +strict +store
237 $x->[$N[0]]->[$N[1]] = 1 # exists $x->[$N[2]]->[$N[3]] # '', '', [ [ undef, 1 ], undef, [ ] ] # +strict +store
238
239 --- delete ---
240
241 $x # delete $x->[$N[0]] # '', undef, [ ]
242 $x # delete $x->[$N[0]] # '', undef, undef #
243 $x # delete $x->[$N[0]] # '', undef, [ ] # +fetch
244 $x # delete $x->[$N[0]] # '', undef, [ ] # +exists
245 $x # delete $x->[$N[0]] # '', undef, undef # +delete
246 $x # delete $x->[$N[0]] # '', undef, [ ] # +store
247
248 $x # delete $x->[$N[0]] # '', undef, [ ] # +strict +fetch
249 $x # delete $x->[$N[0]] # '', undef, [ ] # +strict +exists
250 $x # delete $x->[$N[0]] # qr/^Reference vivification forbidden/, undef, undef # +strict +delete
251 $x # delete $x->[$N[0]] # '', undef, [ ] # +strict +store
252
253 $x # delete $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ]
254 $x # delete $x->[$N[0]]->[$N[1]] # '', undef, undef #
255 $x # delete $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ] # +fetch
256 $x # delete $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ] # +exists
257 $x # delete $x->[$N[0]]->[$N[1]] # '', undef, undef # +delete
258 $x # delete $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ] # +store
259
260 $x # delete $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ] # +strict +fetch
261 $x # delete $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ] # +strict +exists
262 $x # delete $x->[$N[0]]->[$N[1]] # qr/^Reference vivification forbidden/, undef, undef # +strict +delete
263 $x # delete $x->[$N[0]]->[$N[1]] # '', undef, [ [ ] ] # +strict +store
264
265 $x->[$N[0]] = 1 # delete $x->[$N[0]] # '', 1, [ ] # +fetch
266 $x->[$N[0]] = 1 # delete $x->[$N[1]] # '', undef, [ 1 ] # +fetch
267 $x->[$N[0]] = 1 # delete $x->[$N[0]] # '', 1, [ ] # +exists
268 $x->[$N[0]] = 1 # delete $x->[$N[1]] # '', undef, [ 1 ] # +exists
269 $x->[$N[0]] = 1 # delete $x->[$N[0]] # '', 1, [ ] # +delete
270 $x->[$N[0]] = 1 # delete $x->[$N[1]] # '', undef, [ 1 ] # +delete
271 $x->[$N[0]] = 1 # delete $x->[$N[0]] # '', 1, [ ] # +store
272 $x->[$N[0]] = 1 # delete $x->[$N[1]] # '', undef, [ 1 ] # +store
273
274 $x->[$N[0]] = 1 # delete $x->[$N[0]] # '', 1, [ ] # +strict +fetch
275 $x->[$N[0]] = 1 # delete $x->[$N[1]] # '', undef, [ 1 ] # +strict +fetch
276 $x->[$N[0]] = 1 # delete $x->[$N[0]] # '', 1, [ ] # +strict +exists
277 $x->[$N[0]] = 1 # delete $x->[$N[1]] # '', undef, [ 1 ] # +strict +exists
278 $x->[$N[0]] = 1 # delete $x->[$N[0]] # '', 1, [ ] # +strict +delete
279 $x->[$N[0]] = 1 # delete $x->[$N[1]] # '', undef, [ 1 ] # +strict +delete
280 $x->[$N[0]] = 1 # delete $x->[$N[0]] # '', 1, [ ] # +strict +store
281 $x->[$N[0]] = 1 # delete $x->[$N[1]] # '', undef, [ 1 ] # +strict +store
282
283 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[1]] # '', 1, [ [ ] ] # +fetch
284 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ]# +fetch
285 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +fetch
286 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[1]] # '', 1, [ [ ] ] # +exists
287 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ]# +exists
288 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +exists
289 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[1]] # '', 1, [ [ ] ] # +delete
290 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ]# +delete
291 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ] ]# +delete
292 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[1]] # '', 1, [ [ ] ] # +store
293 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ]# +store
294 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +store
295
296 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[1]] # '', 1, [ [ ] ] # +strict +fetch
297 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ] # +strict +fetch
298 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ], undef, [ ] ]# +strict +fetch
299 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[1]] # '', 1, [ [ ] ] # +strict +exists
300 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ] # +strict +exists
301 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ], undef, [ ] ]# +strict +exists
302 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[1]] # '', 1, [ [ ] ] # +strict +delete
303 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ] # +strict +delete
304 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[2]]->[$N[3]] # qr/^Reference vivification forbidden/, undef, [ [ undef, 1 ] ] # +strict +delete
305 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[1]] # '', 1, [ [ ] ] # +strict +store
306 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[0]]->[$N[3]] # '', undef, [ [ undef, 1 ] ] # +strict +store
307 $x->[$N[0]]->[$N[1]] = 1 # delete $x->[$N[2]]->[$N[3]] # '', undef, [ [ undef, 1 ], undef, [ ] ]# +strict +store
308
309 --- store ---
310
311 $x # $x->[$N[0]] = 1 # '', 1, [ 1 ]
312 $x # $x->[$N[0]] = 1 # '', 1, [ 1 ] #
313 $x # $x->[$N[0]] = 1 # '', 1, [ 1 ] # +fetch
314 $x # $x->[$N[0]] = 1 # '', 1, [ 1 ] # +exists
315 $x # $x->[$N[0]] = 1 # '', 1, [ 1 ] # +delete
316 $x # $x->[$N[0]] = 1 # qr/^Can't vivify reference/, undef, undef # +store
317
318 $x # $x->[$N[0]] = 1 # '', 1, [ 1 ] # +strict +fetch
319 $x # $x->[$N[0]] = 1 # '', 1, [ 1 ] # +strict +exists
320 $x # $x->[$N[0]] = 1 # '', 1, [ 1 ] # +strict +delete
321 $x # $x->[$N[0]] = 1 # qr/^Reference vivification forbidden/, undef, undef # +strict +store
322
323 $x # $x->[$N[0]]->[$N[1]] = 1 # '', 1, [ [ undef, 1 ] ]
324 $x # $x->[$N[0]]->[$N[1]] = 1 # '', 1, [ [ undef, 1 ] ] #
325 $x # $x->[$N[0]]->[$N[1]] = 1 # '', 1, [ [ undef, 1 ] ] # +fetch
326 $x # $x->[$N[0]]->[$N[1]] = 1 # '', 1, [ [ undef, 1 ] ] # +exists
327 $x # $x->[$N[0]]->[$N[1]] = 1 # '', 1, [ [ undef, 1 ] ] # +delete
328 $x # $x->[$N[0]]->[$N[1]] = 1 # qr/^Can't vivify reference/, undef, undef # +store
329
330 $x # $x->[$N[0]]->[$N[1]] = 1 # '', 1, [ [ undef, 1 ] ] # +strict +fetch
331 $x # $x->[$N[0]]->[$N[1]] = 1 # '', 1, [ [ undef, 1 ] ] # +strict +exists
332 $x # $x->[$N[0]]->[$N[1]] = 1 # '', 1, [ [ undef, 1 ] ] # +strict +delete
333 $x # $x->[$N[0]]->[$N[1]] = 1 # qr/^Reference vivification forbidden/, undef, undef # +strict +store
334
335 $x->[$N[0]] = 1 # $x->[$N[0]] = 2 # '', 2, [ 2 ] # +fetch
336 $x->[$N[0]] = 1 # $x->[$N[1]] = 2 # '', 2, [ 1, 2 ] # +fetch
337 $x->[$N[0]] = 1 # $x->[$N[0]] = 2 # '', 2, [ 2 ] # +exists
338 $x->[$N[0]] = 1 # $x->[$N[1]] = 2 # '', 2, [ 1, 2 ] # +exists
339 $x->[$N[0]] = 1 # $x->[$N[0]] = 2 # '', 2, [ 2 ] # +delete
340 $x->[$N[0]] = 1 # $x->[$N[1]] = 2 # '', 2, [ 1, 2 ] # +delete
341 $x->[$N[0]] = 1 # $x->[$N[0]] = 2 # '', 2, [ 2 ] # +store
342 $x->[$N[0]] = 1 # $x->[$N[1]] = 2 # '', 2, [ 1, 2 ] # +store
343
344 $x->[$N[0]] = 1 # $x->[$N[0]] = 2 # '', 2, [ 2 ] # +strict +fetch
345 $x->[$N[0]] = 1 # $x->[$N[1]] = 2 # '', 2, [ 1, 2 ] # +strict +fetch
346 $x->[$N[0]] = 1 # $x->[$N[0]] = 2 # '', 2, [ 2 ] # +strict +exists
347 $x->[$N[0]] = 1 # $x->[$N[1]] = 2 # '', 2, [ 1, 2 ] # +strict +exists
348 $x->[$N[0]] = 1 # $x->[$N[0]] = 2 # '', 2, [ 2 ] # +strict +delete
349 $x->[$N[0]] = 1 # $x->[$N[1]] = 2 # '', 2, [ 1, 2 ] # +strict +delete
350 $x->[$N[0]] = 1 # $x->[$N[0]] = 2 # '', 2, [ 2 ] # +strict +store
351 $x->[$N[0]] = 1 # $x->[$N[1]] = 2 # '', 2, [ 1, 2 ] # +strict +store
352
353 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] = 2 # '', 2, [ [ undef, 2 ] ] # +fetch
354 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +fetch
355 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] = 2 # '', 2, [ [ undef, 1 ], undef, [ undef, undef, undef, 2 ] ] # +fetch
356 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] = 2 # '', 2, [ [ undef, 2 ] ] # +exists
357 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +exists
358 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] = 2 # '', 2, [ [ undef, 1 ], undef, [ undef, undef, undef, 2 ] ] # +exists
359 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] = 2 # '', 2, [ [ undef, 2 ] ] # +delete
360 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +delete
361 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] = 2 # '', 2, [ [ undef, 1 ], undef, [ undef, undef, undef, 2 ] ] # +delete
362 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] = 2 # '', 2, [ [ undef, 2 ] ] # +store
363 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +store
364 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] = 2 # qr/^Can't vivify reference/, undef, [ [ undef, 1 ] ] # +store
365
366 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] = 2 # '', 2, [ [ undef, 2 ] ] # +strict +fetch
367 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +strict +fetch
368 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] = 2 # '', 2, [ [ undef, 1 ], undef, [ undef, undef, undef, 2 ] ] # +strict +fetch
369 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] = 2 # '', 2, [ [ undef, 2 ] ] # +strict +exists
370 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +strict +exists
371 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] = 2 # '', 2, [ [ undef, 1 ], undef, [ undef, undef, undef, 2 ] ] # +strict +exists
372 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] = 2 # '', 2, [ [ undef, 2 ] ] # +strict +delete
373 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +strict +delete
374 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] = 2 # '', 2, [ [ undef, 1 ], undef, [ undef, undef, undef, 2 ] ] # +strict +delete
375 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[1]] = 2 # '', 2, [ [ undef, 2 ] ] # +strict +store
376 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[0]]->[$N[3]] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +strict +store
377 $x->[$N[0]]->[$N[1]] = 1 # $x->[$N[2]]->[$N[3]] = 2 # qr/^Reference vivification forbidden/, undef, [ [ undef, 1 ] ] # +strict +store