Re: perl@16433
[p5sagit/p5-mst-13.2.git] / ext / Storable / t / downgrade.t
CommitLineData
530b72ba 1#!./perl -w
2
3#
4# Copyright 2002, Larry Wall.
5#
6# You may redistribute only under the same terms as Perl 5, as specified
7# in the README file that comes with the distribution.
8#
9
10# I ought to keep this test easily backwards compatible to 5.004, so no
11# qr//;
12
13# This test checks downgrade behaviour on pre-5.8 perls when new 5.8 features
14# are encountered.
15
16sub BEGIN {
17 if ($ENV{PERL_CORE}){
18 chdir('t') if -d 't';
19 @INC = '.';
20 push @INC, '../lib';
21 }
22 require Config; import Config;
23 if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) {
24 print "1..0 # Skip: Storable was not built\n";
25 exit 0;
26 }
27 # require 'lib/st-dump.pl';
28}
29
530b72ba 30use Test::More;
31use Storable 'thaw';
32
33use strict;
34use vars qw(@RESTRICT_TESTS %R_HASH %U_HASH $UTF8_CROAK $RESTRICTED_CROAK);
35
36@RESTRICT_TESTS = ('Locked hash', 'Locked hash placeholder',
37 'Locked keys', 'Locked keys placeholder',
38 );
39%R_HASH = (perl => 'rules');
40
41if ($] >= 5.007003) {
42 my $utf8 = "Schlo\xdf" . chr 256;
43 chop $utf8;
44
45 %U_HASH = (map {$_, $_} 'castle', "ch\xe5teau", $utf8, chr 0x57CE);
46 plan tests => 169;
47} elsif ($] >= 5.006) {
48 plan tests => 59;
49} else {
50 plan tests => 67;
51}
52
53$UTF8_CROAK = qr/^Cannot retrieve UTF8 data in non-UTF8 perl/;
54$RESTRICTED_CROAK = qr/^Cannot retrieve restricted hash/;
55
56my %tests;
57{
58 local $/ = "\n\nend\n";
59 while (<DATA>) {
60 next unless /\S/s;
61 unless (/begin ([0-7]{3}) ([^\n]*)\n(.*)$/s) {
62 s/\n.*//s;
63 warn "Dodgy data in section starting '$_'";
64 next;
65 }
66 next unless oct $1 == ord 'A'; # Skip ASCII on EBCDIC, and vice versa
67 my $data = unpack 'u', $3;
68 $tests{$2} = $data;
69 }
70}
71
72# use Data::Dumper; $Data::Dumper::Useqq = 1; print Dumper \%tests;
73sub thaw_hash {
74 my ($name, $expected) = @_;
75 my $hash = eval {thaw $tests{$name}};
76 is ($@, '', "Thawed $name without error?");
77 isa_ok ($hash, 'HASH');
78 ok (defined $hash && eq_hash($hash, $expected),
79 "And it is the hash we expected?");
80 $hash;
81}
82
83sub thaw_scalar {
84 my ($name, $expected) = @_;
85 my $scalar = eval {thaw $tests{$name}};
86 is ($@, '', "Thawed $name without error?");
87 isa_ok ($scalar, 'SCALAR', "Thawed $name?");
88 is ($$scalar, $expected, "And it is the data we expected?");
89 $scalar;
90}
91
92sub thaw_fail {
93 my ($name, $expected) = @_;
94 my $thing = eval {thaw $tests{$name}};
95 is ($thing, undef, "Thawed $name failed as expected?");
96 like ($@, $expected, "Error as predicted?");
97}
98
99sub test_locked_hash {
100 my $hash = shift;
101 my @keys = keys %$hash;
102 my ($key, $value) = each %$hash;
103 eval {$hash->{$key} = reverse $value};
104 like( $@, qr/^Modification of a read-only value attempted/,
105 'trying to change a locked key' );
106 is ($hash->{$key}, $value, "hash should not change?");
107 eval {$hash->{use} = 'perl'};
108 like( $@, qr/^Attempt to access disallowed key 'use' in a restricted hash/,
109 'trying to add another key' );
110 ok (eq_array([keys %$hash], \@keys), "Still the same keys?");
111}
112
113sub test_restricted_hash {
114 my $hash = shift;
115 my @keys = keys %$hash;
116 my ($key, $value) = each %$hash;
117 eval {$hash->{$key} = reverse $value};
118 is( $@, '',
119 'trying to change a restricted key' );
120 is ($hash->{$key}, reverse ($value), "hash should change");
121 eval {$hash->{use} = 'perl'};
122 like( $@, qr/^Attempt to access disallowed key 'use' in a restricted hash/,
123 'trying to add another key' );
124 ok (eq_array([keys %$hash], \@keys), "Still the same keys?");
125}
126
127sub test_placeholder {
128 my $hash = shift;
129 eval {$hash->{rules} = 42};
130 is ($@, '', 'No errors');
131 is ($hash->{rules}, 42, "New value added");
132}
133
134sub test_newkey {
135 my $hash = shift;
136 eval {$hash->{nms} = "http://nms-cgi.sourceforge.net/"};
137 is ($@, '', 'No errors');
138 is ($hash->{nms}, "http://nms-cgi.sourceforge.net/", "New value added");
139}
140
141# $Storable::DEBUGME = 1;
142thaw_hash ('Hash with utf8 flag but no utf8 keys', \%R_HASH);
143
144if (eval "use Hash::Util; 1") {
145 print "# We have Hash::Util, so test that the restricted hashes in <DATA> are valid\n";
146 for $Storable::downgrade_restricted (0, 1, undef, "cheese") {
147 my $hash = thaw_hash ('Locked hash', \%R_HASH);
148 test_locked_hash ($hash);
149 $hash = thaw_hash ('Locked hash placeholder', \%R_HASH);
150 test_locked_hash ($hash);
151 test_placeholder ($hash);
152
153 $hash = thaw_hash ('Locked keys', \%R_HASH);
154 test_restricted_hash ($hash);
155 $hash = thaw_hash ('Locked keys placeholder', \%R_HASH);
156 test_restricted_hash ($hash);
157 test_placeholder ($hash);
158 }
159} else {
160 print "# We don't have Hash::Util, so test that the restricted hashes downgrade\n";
161 my $hash = thaw_hash ('Locked hash', \%R_HASH);
162 test_newkey ($hash);
163 $hash = thaw_hash ('Locked hash placeholder', \%R_HASH);
164 test_newkey ($hash);
165 $hash = thaw_hash ('Locked keys', \%R_HASH);
166 test_newkey ($hash);
167 $hash = thaw_hash ('Locked keys placeholder', \%R_HASH);
168 test_newkey ($hash);
169 local $Storable::downgrade_restricted = 0;
170 thaw_fail ('Locked hash', $RESTRICTED_CROAK);
171 thaw_fail ('Locked hash placeholder', $RESTRICTED_CROAK);
172 thaw_fail ('Locked keys', $RESTRICTED_CROAK);
173 thaw_fail ('Locked keys placeholder', $RESTRICTED_CROAK);
174}
175
176if ($] >= 5.006) {
177 print "# We have utf8 scalars, so test that the utf8 scalars in <DATA> are valid\n";
178 print "# These seem to fail on 5.6 - you should seriously consider upgrading to 5.6.1\n" if $] == 5.006;
179 thaw_scalar ('Short 8 bit utf8 data', "\xDF");
180 thaw_scalar ('Long 8 bit utf8 data', "\xDF" x 256);
181 thaw_scalar ('Short 24 bit utf8 data', chr 0xC0FFEE);
182 thaw_scalar ('Long 24 bit utf8 data', chr (0xC0FFEE) x 256);
183} else {
184 print "# We don't have utf8 scalars, so test that the utf8 scalars downgrade\n";
185 thaw_fail ('Short 8 bit utf8 data', $UTF8_CROAK);
186 thaw_fail ('Long 8 bit utf8 data', $UTF8_CROAK);
187 thaw_fail ('Short 24 bit utf8 data', $UTF8_CROAK);
188 thaw_fail ('Long 24 bit utf8 data', $UTF8_CROAK);
189 local $Storable::drop_utf8 = 1;
190 my $bytes = thaw $tests{'Short 8 bit utf8 data as bytes'};
191 thaw_scalar ('Short 8 bit utf8 data', $$bytes);
192 thaw_scalar ('Long 8 bit utf8 data', $$bytes x 256);
193 $bytes = thaw $tests{'Short 24 bit utf8 data as bytes'};
194 thaw_scalar ('Short 24 bit utf8 data', $$bytes);
195 thaw_scalar ('Long 24 bit utf8 data', $$bytes x 256);
196}
197
198if ($] >= 5.007003) {
199 print "# We have utf8 hashes, so test that the utf8 hashes in <DATA> are valid\n";
200 my $hash = thaw_hash ('Hash with utf8 keys', \%U_HASH);
201 for (keys %$hash) {
202 my $l = 0 + /^\w+$/;
203 my $r = 0 + $hash->{$_} =~ /^\w+$/;
204 cmp_ok ($l, '==', $r, sprintf "key length %d", length $_);
205 cmp_ok ($l, '==', $_ eq "ch\xe5teau" ? 0 : 1);
206 }
207 if (eval "use Hash::Util; 1") {
208 print "# We have Hash::Util, so test that the restricted utf8 hash is valid\n";
209 my $hash = thaw_hash ('Locked hash with utf8 keys', \%U_HASH);
210 for (keys %$hash) {
211 my $l = 0 + /^\w+$/;
212 my $r = 0 + $hash->{$_} =~ /^\w+$/;
213 cmp_ok ($l, '==', $r, sprintf "key length %d", length $_);
214 cmp_ok ($l, '==', $_ eq "ch\xe5teau" ? 0 : 1);
215 }
216 test_locked_hash ($hash);
217 } else {
218 print "# We don't have Hash::Util, so test that the utf8 hash downgrades\n";
219 fail ("You can't get here [perl version $]]. This is a bug in the test.
220# Please send the output of perl -V to perlbug\@perl.org");
221 }
222} else {
223 print "# We don't have utf8 hashes, so test that the utf8 hashes downgrade\n";
224 thaw_fail ('Hash with utf8 keys', $UTF8_CROAK);
225 thaw_fail ('Locked hash with utf8 keys', $UTF8_CROAK);
226 local $Storable::drop_utf8 = 1;
227 my $what = $] < 5.006 ? 'pre 5.6' : '5.6';
228 my $expect = thaw $tests{"Hash with utf8 keys for $what"};
229 thaw_hash ('Hash with utf8 keys', $expect);
230 #foreach (keys %$expect) { print "'$_':\t'$expect->{$_}'\n"; }
231 #foreach (keys %$got) { print "'$_':\t'$got->{$_}'\n"; }
232 if (eval "use Hash::Util; 1") {
233 print "# We have Hash::Util, so test that the restricted hashes in <DATA> are valid\n";
234 fail ("You can't get here [perl version $]]. This is a bug in the test.
235# Please send the output of perl -V to perlbug\@perl.org");
236 } else {
237 print "# We don't have Hash::Util, so test that the restricted hashes downgrade\n";
238 my $hash = thaw_hash ('Locked hash with utf8 keys', $expect);
239 test_newkey ($hash);
240 local $Storable::downgrade_restricted = 0;
241 thaw_fail ('Locked hash with utf8 keys', $RESTRICTED_CROAK);
242 # Which croak comes first is a bit of an implementation issue :-)
243 local $Storable::drop_utf8 = 0;
244 thaw_fail ('Locked hash with utf8 keys', $RESTRICTED_CROAK);
245 }
246}
247__END__
248# A whole run of 2.x nfreeze data, uuencoded. The "mode bits" are the octal
249# value of 'A', the "file name" is the test name. Use make_downgrade.pl to
250# generate these.
251begin 101 Locked hash
2528!049`0````$*!7)U;&5S!`````1P97)L
253
254end
255
256begin 101 Locked hash placeholder
257C!049`0````(*!7)U;&5S!`````1P97)L#A0````%<G5L97,`
258
259end
260
261begin 101 Locked keys
2628!049`0````$*!7)U;&5S``````1P97)L
263
264end
265
266begin 101 Locked keys placeholder
267C!049`0````(*!7)U;&5S``````1P97)L#A0````%<G5L97,`
268
269end
270
271begin 101 Short 8 bit utf8 data
272&!047`L.?
273
274end
275
276begin 101 Short 8 bit utf8 data as bytes
277&!04*`L.?
278
279end
280
281begin 101 Long 8 bit utf8 data
282M!048```"`,.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?
283MPY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#
284MG\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?
285MPY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#
286MG\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?
287MPY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#
288MG\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?
289MPY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#
290MG\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?
291MPY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#
292MG\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?
2938PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?
294
295end
296
297begin 101 Short 24 bit utf8 data
298)!047!?BPC[^N
299
300end
301
302begin 101 Short 24 bit utf8 data as bytes
303)!04*!?BPC[^N
304
305end
306
307begin 101 Long 24 bit utf8 data
308M!048```%`/BPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
309MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
310MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
311MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
312MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
313MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
314MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
315MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
316MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
317MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
318MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
319MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
320MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
321MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
322MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
323MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
324MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
325MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
326MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
327MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
328MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
329MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
330MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
331MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
332MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
333MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
334MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
335MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
336;OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N
337
338end
339
340begin 101 Hash with utf8 flag but no utf8 keys
3418!049``````$*!7)U;&5S``````1P97)L
342
343end
344
345begin 101 Hash with utf8 keys
346M!049``````0*!F-A<W1L90`````&8V%S=&QE"@=C:.5T96%U``````=C:.5T
347D96%U%P/EGXX!`````^6?CA<'4V-H;&_#GP(````&4V-H;&_?
348
349end
350
351begin 101 Locked hash with utf8 keys
352M!049`0````0*!F-A<W1L900````&8V%S=&QE"@=C:.5T96%U!`````=C:.5T
353D96%U%P/EGXX%`````^6?CA<'4V-H;&_#GP8````&4V-H;&_?
354
355end
356
357begin 101 Hash with utf8 keys for pre 5.6
358M!049``````0*!F-A<W1L90`````&8V%S=&QE"@=C:.5T96%U``````=C:.5T
359D96%U"@/EGXX``````^6?C@H'4V-H;&_#GP(````&4V-H;&_?
360
361end
362
363begin 101 Hash with utf8 keys for 5.6
364M!049``````0*!F-A<W1L90`````&8V%S=&QE"@=C:.5T96%U``````=C:.5T
365D96%U%P/EGXX``````^6?CA<'4V-H;&_#GP(````&4V-H;&_?
366
367end
368
62cc3256 369begin 301 Locked hash
3708!049`0````$*!9FDDX6B!`````27A9F3
371
372end
373
374begin 301 Locked hash placeholder
375C!049`0````(.%`````69I).%H@H%F:23A:(`````!)>%F9,`
376
377end
378
379begin 301 Locked keys
3808!049`0````$*!9FDDX6B``````27A9F3
381
382end
383
384begin 301 Locked keys placeholder
385C!049`0````(.%`````69I).%H@H%F:23A:(`````!)>%F9,`
386
387end
388
389begin 301 Short 8 bit utf8 data
390&!047`HMS
391
392end
393
394begin 301 Short 8 bit utf8 data as bytes
395&!04*`HMS
396
397end
398
399begin 301 Long 8 bit utf8 data
400M!04!```"`(MSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS
401MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+
402M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS
403MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+
404M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS
405MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+
406M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS
407MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+
408M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS
409MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+
410M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS
4118BW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS
412
413end
414
415begin 301 Short 24 bit utf8 data
416*!047!OM30G-S50``
417
418end
419
420begin 301 Short 24 bit utf8 data as bytes
421*!04*!OM30G-S50``
422
423end
424
425begin 301 Long 24 bit utf8 data
426M!04!```&`/M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
427M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
428M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
429M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
430M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
431M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
432M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
433M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
434M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
435M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
436M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
437M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
438M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
439M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
440M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
441M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
442M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
443M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
444M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
445M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
446M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
447M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
448M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
449M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
450M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
451M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
452M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
453M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
454M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
455M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
456M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
457M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
458M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
459M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
460-5?M30G-S5?M30G-S50``
461
462end
463
464begin 301 Hash with utf8 flag but no utf8 keys
4658!049``````$*!9FDDX6B``````27A9F3
466
467end
468
469begin 301 Hash with utf8 keys
470M!049``````0*!H.!HJ.3A0`````&@X&BHY.%%P3<9')5`0````3<9')5%P?B
471F@XB3EHMS`@````;B@XB3EM\*!X.(Y:.%@:0`````!X.(Y:.%@:0`
472
473end
474
475begin 301 Locked hash with utf8 keys
476M!049`0````0*!H.!HJ.3A00````&@X&BHY.%%P3<9')5!0````3<9')5%P?B
477F@XB3EHMS!@````;B@XB3EM\*!X.(Y:.%@:0$````!X.(Y:.%@:0`
478
479end
480
481begin 301 Hash with utf8 keys for pre 5.6
482M!049``````0*!H.!HJ.3A0`````&@X&BHY.%"@>#B.6CA8&D``````>#B.6C
483FA8&D"@?B@XB3EHMS`@````;B@XB3EM\*!-QD<E4`````!-QD<E4`
484
485end
486
487begin 301 Hash with utf8 keys for 5.6
488M!049``````0*!H.!HJ.3A0`````&@X&BHY.%"@>#B.6CA8&D``````>#B.6C
489FA8&D%P?B@XB3EHMS`@````;B@XB3EM\7!-QD<E4`````!-QD<E4`
490
491end
492