4 # Copyright (c) 1995-2000, Raphael Manfredi
6 # You may redistribute only under the same terms as Perl 5, as specified
7 # in the README file that comes with the distribution.
12 print "1..0 # Skip: no utf8 support\n";
17 @INC = ('.', '../lib', '../ext/Storable/t');
21 require Config; import Config;
22 if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) {
23 print "1..0 # Skip: Storable was not built\n";
32 use Storable qw(thaw freeze);
37 ok 1, $x eq ${thaw freeze \$x};
40 $x = join '', map {chr $_} (0..1023);
41 ok 2, $x eq ${thaw freeze \$x};
43 # Char in the range 127-255 (probably) in utf8
44 $x = chr (175) . chr (256);
46 ok 3, $x eq ${thaw freeze \$x};
48 # Storable needs to cope if a frozen string happens to be internall utf8
52 my $data = freeze \$x;
53 ok 4, $x eq ${thaw $data};
57 ok 5, $x eq ${thaw $data};
61 # This definately isn't valid
63 ok 6, $@ =~ /corrupt.*characters outside/;