4 # Copyright 2002, Larry Wall.
6 # You may redistribute only under the same terms as Perl 5, as specified
7 # in the README file that comes with the distribution.
10 # I ought to keep this test easily backwards compatible to 5.004, so no
13 # This test checks downgrade behaviour on pre-5.8 perls when new 5.8 features
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";
27 # require 'lib/st-dump.pl';
34 use vars qw(@RESTRICT_TESTS %R_HASH %U_HASH $UTF8_CROAK $RESTRICTED_CROAK);
36 @RESTRICT_TESTS = ('Locked hash', 'Locked hash placeholder',
37 'Locked keys', 'Locked keys placeholder',
39 %R_HASH = (perl => 'rules');
42 my $utf8 = "Schlo\xdf" . chr 256;
45 %U_HASH = (map {$_, $_} 'castle', "ch\xe5teau", $utf8, chr 0x57CE);
47 } elsif ($] >= 5.006) {
53 $UTF8_CROAK = qr/^Cannot retrieve UTF8 data in non-UTF8 perl/;
54 $RESTRICTED_CROAK = qr/^Cannot retrieve restricted hash/;
58 local $/ = "\n\nend\n";
61 unless (/begin ([0-7]{3}) ([^\n]*)\n(.*)$/s) {
63 warn "Dodgy data in section starting '$_'";
66 next unless oct $1 == ord 'A'; # Skip ASCII on EBCDIC, and vice versa
67 my $data = unpack 'u', $3;
72 # use Data::Dumper; $Data::Dumper::Useqq = 1; print Dumper \%tests;
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?");
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?");
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?");
99 sub test_locked_hash {
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?");
113 sub test_restricted_hash {
115 my @keys = keys %$hash;
116 my ($key, $value) = each %$hash;
117 eval {$hash->{$key} = reverse $value};
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?");
127 sub test_placeholder {
129 eval {$hash->{rules} = 42};
130 is ($@, '', 'No errors');
131 is ($hash->{rules}, 42, "New value added");
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");
141 # $Storable::DEBUGME = 1;
142 thaw_hash ('Hash with utf8 flag but no utf8 keys', \%R_HASH);
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);
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);
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);
163 $hash = thaw_hash ('Locked hash placeholder', \%R_HASH);
165 $hash = thaw_hash ('Locked keys', \%R_HASH);
167 $hash = thaw_hash ('Locked keys placeholder', \%R_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);
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);
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);
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);
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);
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);
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);
216 test_locked_hash ($hash);
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");
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");
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);
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);
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
251 begin 101 Locked hash
252 8!049`0````$*!7)U;&5S!`````1P97)L
256 begin 101 Locked hash placeholder
257 C!049`0````(*!7)U;&5S!`````1P97)L#A0````%<G5L97,`
261 begin 101 Locked keys
262 8!049`0````$*!7)U;&5S``````1P97)L
266 begin 101 Locked keys placeholder
267 C!049`0````(*!7)U;&5S``````1P97)L#A0````%<G5L97,`
271 begin 101 Short 8 bit utf8 data
276 begin 101 Short 8 bit utf8 data as bytes
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\.?
297 begin 101 Short 24 bit utf8 data
302 begin 101 Short 24 bit utf8 data as bytes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:.5T
347 D96%U%P/EGXX!`````^6?CA<'4V-H;&_#GP(````&4V-H;&_?
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;&_?
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;&_?
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;&_?
369 begin 301 Locked hash
370 8!049`0````$*!9FDDX6B!`````27A9F3
374 begin 301 Locked hash placeholder
375 C!049`0````(.%`````69I).%H@H%F:23A:(`````!)>%F9,`
379 begin 301 Locked keys
380 8!049`0````$*!9FDDX6B``````27A9F3
384 begin 301 Locked keys placeholder
385 C!049`0````(.%`````69I).%H@H%F:23A:(`````!)>%F9,`
389 begin 301 Short 8 bit utf8 data
394 begin 301 Short 8 bit utf8 data as bytes
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
415 begin 301 Short 24 bit utf8 data
420 begin 301 Short 24 bit utf8 data as bytes
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``
464 begin 301 Hash with utf8 flag but no utf8 keys
465 8!049``````$*!9FDDX6B``````27A9F3
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`
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`
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`
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`