Commit | Line | Data |
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 | |
16 | sub 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 |
30 | use Test::More; |
31 | use Storable 'thaw'; |
32 | |
33 | use strict; |
34 | use 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 | |
41 | if ($] >= 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 | |
56 | my %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; |
73 | sub 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 | |
83 | sub 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 | |
92 | sub 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 | |
99 | sub 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 | |
113 | sub 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 | |
127 | sub 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 | |
134 | sub 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; |
142 | thaw_hash ('Hash with utf8 flag but no utf8 keys', \%R_HASH); |
143 | |
144 | if (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 | |
176 | if ($] >= 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 | |
198 | if ($] >= 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. |
251 | begin 101 Locked hash |
252 | 8!049`0````$*!7)U;&5S!`````1P97)L |
253 | |
254 | end |
255 | |
256 | begin 101 Locked hash placeholder |
257 | C!049`0````(*!7)U;&5S!`````1P97)L#A0````%<G5L97,` |
258 | |
259 | end |
260 | |
261 | begin 101 Locked keys |
262 | 8!049`0````$*!7)U;&5S``````1P97)L |
263 | |
264 | end |
265 | |
266 | begin 101 Locked keys placeholder |
267 | C!049`0````(*!7)U;&5S``````1P97)L#A0````%<G5L97,` |
268 | |
269 | end |
270 | |
271 | begin 101 Short 8 bit utf8 data |
272 | &!047`L.? |
273 | |
274 | end |
275 | |
276 | begin 101 Short 8 bit utf8 data as bytes |
277 | &!04*`L.? |
278 | |
279 | end |
280 | |
281 | begin 101 Long 8 bit utf8 data |
282 | M!048```"`,.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.? |
283 | MPY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_# |
284 | MG\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.? |
285 | MPY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_# |
286 | MG\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.? |
287 | MPY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_# |
288 | MG\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.? |
289 | MPY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_# |
290 | MG\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.? |
291 | MPY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_# |
292 | MG\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.? |
293 | 8PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.? |
294 | |
295 | end |
296 | |
297 | begin 101 Short 24 bit utf8 data |
298 | )!047!?BPC[^N |
299 | |
300 | end |
301 | |
302 | begin 101 Short 24 bit utf8 data as bytes |
303 | )!04*!?BPC[^N |
304 | |
305 | end |
306 | |
307 | begin 101 Long 24 bit utf8 data |
308 | M!048```%`/BPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
309 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
310 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
311 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
312 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
313 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
314 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
315 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
316 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
317 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
318 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
319 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
320 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
321 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
322 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
323 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
324 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
325 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
326 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
327 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
328 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
329 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
330 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
331 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
332 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
333 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
334 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
335 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ |
336 | ;OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N |
337 | |
338 | end |
339 | |
340 | begin 101 Hash with utf8 flag but no utf8 keys |
341 | 8!049``````$*!7)U;&5S``````1P97)L |
342 | |
343 | end |
344 | |
345 | begin 101 Hash with utf8 keys |
346 | M!049``````0*!F-A<W1L90`````&8V%S=&QE"@=C:.5T96%U``````=C:.5T |
347 | D96%U%P/EGXX!`````^6?CA<'4V-H;&_#GP(````&4V-H;&_? |
348 | |
349 | end |
350 | |
351 | begin 101 Locked hash with utf8 keys |
352 | M!049`0````0*!F-A<W1L900````&8V%S=&QE"@=C:.5T96%U!`````=C:.5T |
353 | D96%U%P/EGXX%`````^6?CA<'4V-H;&_#GP8````&4V-H;&_? |
354 | |
355 | end |
356 | |
357 | begin 101 Hash with utf8 keys for pre 5.6 |
358 | M!049``````0*!F-A<W1L90`````&8V%S=&QE"@=C:.5T96%U``````=C:.5T |
359 | D96%U"@/EGXX``````^6?C@H'4V-H;&_#GP(````&4V-H;&_? |
360 | |
361 | end |
362 | |
363 | begin 101 Hash with utf8 keys for 5.6 |
364 | M!049``````0*!F-A<W1L90`````&8V%S=&QE"@=C:.5T96%U``````=C:.5T |
365 | D96%U%P/EGXX``````^6?CA<'4V-H;&_#GP(````&4V-H;&_? |
366 | |
367 | end |
368 | |
62cc3256 |
369 | begin 301 Locked hash |
370 | 8!049`0````$*!9FDDX6B!`````27A9F3 |
371 | |
372 | end |
373 | |
374 | begin 301 Locked hash placeholder |
375 | C!049`0````(.%`````69I).%H@H%F:23A:(`````!)>%F9,` |
376 | |
377 | end |
378 | |
379 | begin 301 Locked keys |
380 | 8!049`0````$*!9FDDX6B``````27A9F3 |
381 | |
382 | end |
383 | |
384 | begin 301 Locked keys placeholder |
385 | C!049`0````(.%`````69I).%H@H%F:23A:(`````!)>%F9,` |
386 | |
387 | end |
388 | |
389 | begin 301 Short 8 bit utf8 data |
390 | &!047`HMS |
391 | |
392 | end |
393 | |
394 | begin 301 Short 8 bit utf8 data as bytes |
395 | &!04*`HMS |
396 | |
397 | end |
398 | |
399 | begin 301 Long 8 bit utf8 data |
400 | M!04!```"`(MSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS |
401 | MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+ |
402 | M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS |
403 | MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+ |
404 | M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS |
405 | MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+ |
406 | M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS |
407 | MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+ |
408 | M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS |
409 | MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+ |
410 | M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS |
411 | 8BW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS |
412 | |
413 | end |
414 | |
415 | begin 301 Short 24 bit utf8 data |
416 | *!047!OM30G-S50`` |
417 | |
418 | end |
419 | |
420 | begin 301 Short 24 bit utf8 data as bytes |
421 | *!04*!OM30G-S50`` |
422 | |
423 | end |
424 | |
425 | begin 301 Long 24 bit utf8 data |
426 | M!04!```&`/M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 |
427 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S |
428 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 |
429 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S |
430 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 |
431 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S |
432 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 |
433 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S |
434 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 |
435 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S |
436 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 |
437 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S |
438 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 |
439 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S |
440 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 |
441 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S |
442 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 |
443 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S |
444 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 |
445 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S |
446 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 |
447 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S |
448 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 |
449 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S |
450 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 |
451 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S |
452 | M5?M30G-S5?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 | -5?M30G-S5?M30G-S50`` |
461 | |
462 | end |
463 | |
464 | begin 301 Hash with utf8 flag but no utf8 keys |
465 | 8!049``````$*!9FDDX6B``````27A9F3 |
466 | |
467 | end |
468 | |
469 | begin 301 Hash with utf8 keys |
470 | M!049``````0*!H.!HJ.3A0`````&@X&BHY.%%P3<9')5`0````3<9')5%P?B |
471 | F@XB3EHMS`@````;B@XB3EM\*!X.(Y:.%@:0`````!X.(Y:.%@:0` |
472 | |
473 | end |
474 | |
475 | begin 301 Locked hash with utf8 keys |
476 | M!049`0````0*!H.!HJ.3A00````&@X&BHY.%%P3<9')5!0````3<9')5%P?B |
477 | F@XB3EHMS!@````;B@XB3EM\*!X.(Y:.%@:0$````!X.(Y:.%@:0` |
478 | |
479 | end |
480 | |
481 | begin 301 Hash with utf8 keys for pre 5.6 |
482 | M!049``````0*!H.!HJ.3A0`````&@X&BHY.%"@>#B.6CA8&D``````>#B.6C |
483 | FA8&D"@?B@XB3EHMS`@````;B@XB3EM\*!-QD<E4`````!-QD<E4` |
484 | |
485 | end |
486 | |
487 | begin 301 Hash with utf8 keys for 5.6 |
488 | M!049``````0*!H.!HJ.3A0`````&@X&BHY.%"@>#B.6CA8&D``````>#B.6C |
489 | FA8&D%P?B@XB3EHMS`@````;B@XB3EM\7!-QD<E4`````!-QD<E4` |
490 | |
491 | end |
492 | |