Re: [PATCH] Enhanced Storable::read_magic()
[p5sagit/p5-mst-13.2.git] / ext / Storable / t / downgrade.t
CommitLineData
530b72ba 1#!./perl -w
530b72ba 2#
3# Copyright 2002, Larry Wall.
4#
5# You may redistribute only under the same terms as Perl 5, as specified
6# in the README file that comes with the distribution.
7#
8
9# I ought to keep this test easily backwards compatible to 5.004, so no
10# qr//;
11
12# This test checks downgrade behaviour on pre-5.8 perls when new 5.8 features
13# are encountered.
14
15sub BEGIN {
16 if ($ENV{PERL_CORE}){
17 chdir('t') if -d 't';
372cb964 18 @INC = ('.', '../lib');
19 } else {
20 unshift @INC, 't';
530b72ba 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 }
530b72ba 27}
28
530b72ba 29use Test::More;
30use Storable 'thaw';
31
32use strict;
33use vars qw(@RESTRICT_TESTS %R_HASH %U_HASH $UTF8_CROAK $RESTRICTED_CROAK);
34
35@RESTRICT_TESTS = ('Locked hash', 'Locked hash placeholder',
36 'Locked keys', 'Locked keys placeholder',
37 );
38%R_HASH = (perl => 'rules');
39
bfe34c33 40if ($] > 5.007002) {
7e416500 41 # This is cheating. "\xdf" in Latin 1 is beta S, so will match \w if it
42 # is stored in utf8, not bytes.
43 # "\xdf" is y diaresis in EBCDIC (except for cp875, but so far no-one seems
44 # to use that) which has exactly the same properties for \w
45 # So the tests happen to pass.
530b72ba 46 my $utf8 = "Schlo\xdf" . chr 256;
47 chop $utf8;
48
7e416500 49 # \xe5 is V in EBCDIC. That doesn't have the same properties w.r.t. \w as
50 # an a circumflex, so we need to be explicit.
51
52 # and its these very properties we're trying to test - an edge case
53 # involving whether scalars are being stored in bytes or in utf8.
54 my $a_circumflex = (ord ('A') == 193 ? "\x47" : "\xe5");
55 %U_HASH = (map {$_, $_} 'castle', "ch${a_circumflex}teau", $utf8, chr 0x57CE);
530b72ba 56 plan tests => 169;
57} elsif ($] >= 5.006) {
58 plan tests => 59;
59} else {
60 plan tests => 67;
61}
62
a2307be4 63$UTF8_CROAK = "/^Cannot retrieve UTF8 data in non-UTF8 perl/";
64$RESTRICTED_CROAK = "/^Cannot retrieve restricted hash/";
530b72ba 65
66my %tests;
67{
68 local $/ = "\n\nend\n";
69 while (<DATA>) {
70 next unless /\S/s;
71 unless (/begin ([0-7]{3}) ([^\n]*)\n(.*)$/s) {
72 s/\n.*//s;
73 warn "Dodgy data in section starting '$_'";
74 next;
75 }
76 next unless oct $1 == ord 'A'; # Skip ASCII on EBCDIC, and vice versa
77 my $data = unpack 'u', $3;
78 $tests{$2} = $data;
79 }
80}
81
82# use Data::Dumper; $Data::Dumper::Useqq = 1; print Dumper \%tests;
83sub thaw_hash {
84 my ($name, $expected) = @_;
85 my $hash = eval {thaw $tests{$name}};
86 is ($@, '', "Thawed $name without error?");
87 isa_ok ($hash, 'HASH');
88 ok (defined $hash && eq_hash($hash, $expected),
89 "And it is the hash we expected?");
90 $hash;
91}
92
93sub thaw_scalar {
2aeb6432 94 my ($name, $expected, $bug) = @_;
530b72ba 95 my $scalar = eval {thaw $tests{$name}};
96 is ($@, '', "Thawed $name without error?");
97 isa_ok ($scalar, 'SCALAR', "Thawed $name?");
2aeb6432 98 if ($bug and $] == 5.006) {
99 # Aargh. <expletive> <expletive> 5.6.0's harness doesn't even honour
100 # TODO tests.
101 warn "# Test skipped because eq is buggy for certain Unicode cases in 5.6.0";
102 warn "# Please upgrade to 5.6.1\n";
103 ok ("I'd really like to fail this test on 5.6.0 but I'm told that CPAN auto-dependancies mess up, and certain vendors only ship 5.6.0. Get your vendor to ugrade. Else upgrade your vendor.");
104 # One such vendor being the folks who brought you LONG_MIN as a positive
105 # integer.
106 } else {
107 is ($$scalar, $expected, "And it is the data we expected?");
108 }
530b72ba 109 $scalar;
110}
111
112sub thaw_fail {
113 my ($name, $expected) = @_;
114 my $thing = eval {thaw $tests{$name}};
115 is ($thing, undef, "Thawed $name failed as expected?");
116 like ($@, $expected, "Error as predicted?");
117}
118
119sub test_locked_hash {
120 my $hash = shift;
121 my @keys = keys %$hash;
122 my ($key, $value) = each %$hash;
123 eval {$hash->{$key} = reverse $value};
a2307be4 124 like( $@, "/^Modification of a read-only value attempted/",
530b72ba 125 'trying to change a locked key' );
126 is ($hash->{$key}, $value, "hash should not change?");
127 eval {$hash->{use} = 'perl'};
a2307be4 128 like( $@, "/^Attempt to access disallowed key 'use' in a restricted hash/",
530b72ba 129 'trying to add another key' );
130 ok (eq_array([keys %$hash], \@keys), "Still the same keys?");
131}
132
133sub test_restricted_hash {
134 my $hash = shift;
135 my @keys = keys %$hash;
136 my ($key, $value) = each %$hash;
137 eval {$hash->{$key} = reverse $value};
138 is( $@, '',
139 'trying to change a restricted key' );
140 is ($hash->{$key}, reverse ($value), "hash should change");
141 eval {$hash->{use} = 'perl'};
a2307be4 142 like( $@, "/^Attempt to access disallowed key 'use' in a restricted hash/",
530b72ba 143 'trying to add another key' );
144 ok (eq_array([keys %$hash], \@keys), "Still the same keys?");
145}
146
147sub test_placeholder {
148 my $hash = shift;
149 eval {$hash->{rules} = 42};
150 is ($@, '', 'No errors');
151 is ($hash->{rules}, 42, "New value added");
152}
153
154sub test_newkey {
155 my $hash = shift;
156 eval {$hash->{nms} = "http://nms-cgi.sourceforge.net/"};
157 is ($@, '', 'No errors');
158 is ($hash->{nms}, "http://nms-cgi.sourceforge.net/", "New value added");
159}
160
161# $Storable::DEBUGME = 1;
162thaw_hash ('Hash with utf8 flag but no utf8 keys', \%R_HASH);
163
164if (eval "use Hash::Util; 1") {
165 print "# We have Hash::Util, so test that the restricted hashes in <DATA> are valid\n";
166 for $Storable::downgrade_restricted (0, 1, undef, "cheese") {
167 my $hash = thaw_hash ('Locked hash', \%R_HASH);
168 test_locked_hash ($hash);
169 $hash = thaw_hash ('Locked hash placeholder', \%R_HASH);
170 test_locked_hash ($hash);
171 test_placeholder ($hash);
172
173 $hash = thaw_hash ('Locked keys', \%R_HASH);
174 test_restricted_hash ($hash);
175 $hash = thaw_hash ('Locked keys placeholder', \%R_HASH);
176 test_restricted_hash ($hash);
177 test_placeholder ($hash);
178 }
179} else {
180 print "# We don't have Hash::Util, so test that the restricted hashes downgrade\n";
181 my $hash = thaw_hash ('Locked hash', \%R_HASH);
182 test_newkey ($hash);
183 $hash = thaw_hash ('Locked hash placeholder', \%R_HASH);
184 test_newkey ($hash);
185 $hash = thaw_hash ('Locked keys', \%R_HASH);
186 test_newkey ($hash);
187 $hash = thaw_hash ('Locked keys placeholder', \%R_HASH);
188 test_newkey ($hash);
189 local $Storable::downgrade_restricted = 0;
190 thaw_fail ('Locked hash', $RESTRICTED_CROAK);
191 thaw_fail ('Locked hash placeholder', $RESTRICTED_CROAK);
192 thaw_fail ('Locked keys', $RESTRICTED_CROAK);
193 thaw_fail ('Locked keys placeholder', $RESTRICTED_CROAK);
194}
195
196if ($] >= 5.006) {
197 print "# We have utf8 scalars, so test that the utf8 scalars in <DATA> are valid\n";
2aeb6432 198 thaw_scalar ('Short 8 bit utf8 data', "\xDF", 1);
199 thaw_scalar ('Long 8 bit utf8 data', "\xDF" x 256, 1);
530b72ba 200 thaw_scalar ('Short 24 bit utf8 data', chr 0xC0FFEE);
201 thaw_scalar ('Long 24 bit utf8 data', chr (0xC0FFEE) x 256);
202} else {
203 print "# We don't have utf8 scalars, so test that the utf8 scalars downgrade\n";
204 thaw_fail ('Short 8 bit utf8 data', $UTF8_CROAK);
205 thaw_fail ('Long 8 bit utf8 data', $UTF8_CROAK);
206 thaw_fail ('Short 24 bit utf8 data', $UTF8_CROAK);
207 thaw_fail ('Long 24 bit utf8 data', $UTF8_CROAK);
208 local $Storable::drop_utf8 = 1;
209 my $bytes = thaw $tests{'Short 8 bit utf8 data as bytes'};
210 thaw_scalar ('Short 8 bit utf8 data', $$bytes);
211 thaw_scalar ('Long 8 bit utf8 data', $$bytes x 256);
212 $bytes = thaw $tests{'Short 24 bit utf8 data as bytes'};
213 thaw_scalar ('Short 24 bit utf8 data', $$bytes);
214 thaw_scalar ('Long 24 bit utf8 data', $$bytes x 256);
215}
216
bfe34c33 217if ($] > 5.007002) {
530b72ba 218 print "# We have utf8 hashes, so test that the utf8 hashes in <DATA> are valid\n";
219 my $hash = thaw_hash ('Hash with utf8 keys', \%U_HASH);
220 for (keys %$hash) {
221 my $l = 0 + /^\w+$/;
222 my $r = 0 + $hash->{$_} =~ /^\w+$/;
223 cmp_ok ($l, '==', $r, sprintf "key length %d", length $_);
224 cmp_ok ($l, '==', $_ eq "ch\xe5teau" ? 0 : 1);
225 }
226 if (eval "use Hash::Util; 1") {
227 print "# We have Hash::Util, so test that the restricted utf8 hash is valid\n";
228 my $hash = thaw_hash ('Locked hash with utf8 keys', \%U_HASH);
229 for (keys %$hash) {
230 my $l = 0 + /^\w+$/;
231 my $r = 0 + $hash->{$_} =~ /^\w+$/;
232 cmp_ok ($l, '==', $r, sprintf "key length %d", length $_);
233 cmp_ok ($l, '==', $_ eq "ch\xe5teau" ? 0 : 1);
234 }
235 test_locked_hash ($hash);
236 } else {
237 print "# We don't have Hash::Util, so test that the utf8 hash downgrades\n";
238 fail ("You can't get here [perl version $]]. This is a bug in the test.
239# Please send the output of perl -V to perlbug\@perl.org");
240 }
241} else {
242 print "# We don't have utf8 hashes, so test that the utf8 hashes downgrade\n";
243 thaw_fail ('Hash with utf8 keys', $UTF8_CROAK);
244 thaw_fail ('Locked hash with utf8 keys', $UTF8_CROAK);
245 local $Storable::drop_utf8 = 1;
246 my $what = $] < 5.006 ? 'pre 5.6' : '5.6';
247 my $expect = thaw $tests{"Hash with utf8 keys for $what"};
248 thaw_hash ('Hash with utf8 keys', $expect);
249 #foreach (keys %$expect) { print "'$_':\t'$expect->{$_}'\n"; }
250 #foreach (keys %$got) { print "'$_':\t'$got->{$_}'\n"; }
251 if (eval "use Hash::Util; 1") {
252 print "# We have Hash::Util, so test that the restricted hashes in <DATA> are valid\n";
253 fail ("You can't get here [perl version $]]. This is a bug in the test.
254# Please send the output of perl -V to perlbug\@perl.org");
255 } else {
256 print "# We don't have Hash::Util, so test that the restricted hashes downgrade\n";
257 my $hash = thaw_hash ('Locked hash with utf8 keys', $expect);
258 test_newkey ($hash);
259 local $Storable::downgrade_restricted = 0;
260 thaw_fail ('Locked hash with utf8 keys', $RESTRICTED_CROAK);
261 # Which croak comes first is a bit of an implementation issue :-)
262 local $Storable::drop_utf8 = 0;
263 thaw_fail ('Locked hash with utf8 keys', $RESTRICTED_CROAK);
264 }
265}
266__END__
267# A whole run of 2.x nfreeze data, uuencoded. The "mode bits" are the octal
268# value of 'A', the "file name" is the test name. Use make_downgrade.pl to
269# generate these.
270begin 101 Locked hash
2718!049`0````$*!7)U;&5S!`````1P97)L
272
273end
274
275begin 101 Locked hash placeholder
276C!049`0````(*!7)U;&5S!`````1P97)L#A0````%<G5L97,`
277
278end
279
280begin 101 Locked keys
2818!049`0````$*!7)U;&5S``````1P97)L
282
283end
284
285begin 101 Locked keys placeholder
286C!049`0````(*!7)U;&5S``````1P97)L#A0````%<G5L97,`
287
288end
289
290begin 101 Short 8 bit utf8 data
291&!047`L.?
292
293end
294
295begin 101 Short 8 bit utf8 data as bytes
296&!04*`L.?
297
298end
299
300begin 101 Long 8 bit utf8 data
301M!048```"`,.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?
302MPY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#
303MG\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?
304MPY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#
305MG\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?
306MPY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#
307MG\.?PY_#G\.?PY_#G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(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
352MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
353MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
354MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/
355;OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N
356
357end
358
359begin 101 Hash with utf8 flag but no utf8 keys
3608!049``````$*!7)U;&5S``````1P97)L
361
362end
363
364begin 101 Hash with utf8 keys
365M!049``````0*!F-A<W1L90`````&8V%S=&QE"@=C:.5T96%U``````=C:.5T
366D96%U%P/EGXX!`````^6?CA<'4V-H;&_#GP(````&4V-H;&_?
367
368end
369
370begin 101 Locked hash with utf8 keys
371M!049`0````0*!F-A<W1L900````&8V%S=&QE"@=C:.5T96%U!`````=C:.5T
372D96%U%P/EGXX%`````^6?CA<'4V-H;&_#GP8````&4V-H;&_?
373
374end
375
376begin 101 Hash with utf8 keys for pre 5.6
377M!049``````0*!F-A<W1L90`````&8V%S=&QE"@=C:.5T96%U``````=C:.5T
378D96%U"@/EGXX``````^6?C@H'4V-H;&_#GP(````&4V-H;&_?
379
380end
381
382begin 101 Hash with utf8 keys for 5.6
383M!049``````0*!F-A<W1L90`````&8V%S=&QE"@=C:.5T96%U``````=C:.5T
384D96%U%P/EGXX``````^6?CA<'4V-H;&_#GP(````&4V-H;&_?
385
386end
387
62cc3256 388begin 301 Locked hash
3898!049`0````$*!9FDDX6B!`````27A9F3
390
391end
392
393begin 301 Locked hash placeholder
394C!049`0````(.%`````69I).%H@H%F:23A:(`````!)>%F9,`
395
396end
397
398begin 301 Locked keys
3998!049`0````$*!9FDDX6B``````27A9F3
400
401end
402
403begin 301 Locked keys placeholder
404C!049`0````(.%`````69I).%H@H%F:23A:(`````!)>%F9,`
405
406end
407
408begin 301 Short 8 bit utf8 data
409&!047`HMS
410
411end
412
413begin 301 Short 8 bit utf8 data as bytes
414&!04*`HMS
415
416end
417
418begin 301 Long 8 bit utf8 data
7e416500 419M!048```"`(MSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS
62cc3256 420MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+
421M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS
422MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+
423M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS
424MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+
425M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS
426MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+
427M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS
428MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+
429M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS
4308BW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS
431
432end
433
434begin 301 Short 24 bit utf8 data
435*!047!OM30G-S50``
436
437end
438
439begin 301 Short 24 bit utf8 data as bytes
440*!04*!OM30G-S50``
441
442end
443
444begin 301 Long 24 bit utf8 data
7e416500 445M!048```&`/M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
62cc3256 446M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
447M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
448M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
449M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
450M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
451M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
452M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
453M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
454M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
455M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
456M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
457M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
458M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
459M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
460M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
461M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
462M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
463M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
464M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
465M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
466M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
467M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
468M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
469M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
470M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
471M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
472M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
473M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
474M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
475M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
476M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
477M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3
478M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S
479-5?M30G-S5?M30G-S50``
480
481end
482
483begin 301 Hash with utf8 flag but no utf8 keys
4848!049``````$*!9FDDX6B``````27A9F3
485
486end
487
488begin 301 Hash with utf8 keys
7e416500 489M!049``````0*!X.(1Z.%@:0`````!X.(1Z.%@:0*!H.!HJ.3A0`````&@X&B
490FHY.%%P3<9')5`0````3<9')5%P?B@XB3EHMS`@````;B@XB3EM\`
62cc3256 491
492end
493
494begin 301 Locked hash with utf8 keys
7e416500 495M!049`0````0*!X.(1Z.%@:0$````!X.(1Z.%@:0*!H.!HJ.3A00````&@X&B
496FHY.%%P3<9')5!0````3<9')5%P?B@XB3EHMS!@````;B@XB3EM\`
62cc3256 497
498end
499
500begin 301 Hash with utf8 keys for pre 5.6
7e416500 501M!049``````0*!H.!HJ.3A0`````&@X&BHY.%"@B#B(M&HX6!I``````'@XA'
502GHX6!I`H'XH.(DY:+<P(````&XH.(DY;?"@3<9')5``````3<9')5
62cc3256 503
504end
505
506begin 301 Hash with utf8 keys for 5.6
7e416500 507M!049``````0*!H.!HJ.3A0`````&@X&BHY.%"@>#B$>CA8&D``````>#B$>C
62cc3256 508FA8&D%P?B@XB3EHMS`@````;B@XB3EM\7!-QD<E4`````!-QD<E4`
509
510end