summaryrefslogtreecommitdiff
path: root/ext/Storable
diff options
context:
space:
mode:
Diffstat (limited to 'ext/Storable')
-rw-r--r--ext/Storable/t/downgrade.t7
-rw-r--r--ext/Storable/t/overload.t7
2 files changed, 10 insertions, 4 deletions
diff --git a/ext/Storable/t/downgrade.t b/ext/Storable/t/downgrade.t
index a227360b24..d977a0007d 100644
--- a/ext/Storable/t/downgrade.t
+++ b/ext/Storable/t/downgrade.t
@@ -217,11 +217,12 @@ if ($] >= 5.006) {
if ($] > 5.007002) {
print "# We have utf8 hashes, so test that the utf8 hashes in <DATA> are valid\n";
my $hash = thaw_hash ('Hash with utf8 keys', \%U_HASH);
+ my $a_circumflex = (ord ('A') == 193 ? "\x47" : "\xe5");
for (keys %$hash) {
my $l = 0 + /^\w+$/;
my $r = 0 + $hash->{$_} =~ /^\w+$/;
cmp_ok ($l, '==', $r, sprintf "key length %d", length $_);
- cmp_ok ($l, '==', $_ eq "ch\xe5teau" ? 0 : 1);
+ cmp_ok ($l, '==', $_ eq "ch${a_circumflex}teau" ? 0 : 1);
}
if (eval "use Hash::Util; 1") {
print "# We have Hash::Util, so test that the restricted utf8 hash is valid\n";
@@ -230,7 +231,7 @@ if ($] > 5.007002) {
my $l = 0 + /^\w+$/;
my $r = 0 + $hash->{$_} =~ /^\w+$/;
cmp_ok ($l, '==', $r, sprintf "key length %d", length $_);
- cmp_ok ($l, '==', $_ eq "ch\xe5teau" ? 0 : 1);
+ cmp_ok ($l, '==', $_ eq "ch${a_circumflex}teau" ? 0 : 1);
}
test_locked_hash ($hash);
} else {
@@ -391,7 +392,7 @@ begin 301 Locked hash
end
begin 301 Locked hash placeholder
-C!049`0````(.%`````69I).%H@H%F:23A:(`````!)>%F9,`
+C!049`0````(.%`````69I).%H@H%F:23A:($````!)>%F9,`
end
diff --git a/ext/Storable/t/overload.t b/ext/Storable/t/overload.t
index 31b861d5a2..ceac2b08dc 100644
--- a/ext/Storable/t/overload.t
+++ b/ext/Storable/t/overload.t
@@ -88,7 +88,12 @@ ok 11, "$b->{ref}->{over}" eq "$b";
ok 12, $b + $b == 314;
# nfreeze data generated by make_overload.pl
-my $f = unpack 'u', q{7!084$0Q(05-?3U9%4DQ/040*!'-N;W<`};
+my $f = '';
+if (ord ('A') == 193) { # EBCDIC.
+ $f = unpack 'u', q{7!084$0S(P>)MUN7%V=/6P<0*!**5EJ8`};
+}else {
+ $f = unpack 'u', q{7!084$0Q(05-?3U9%4DQ/040*!'-N;W<`};
+}
# see note at the end of do_retrieve in Storable.xs about why this test has to
# use a reference to an overloaded reference, rather than just a reference.