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