summaryrefslogtreecommitdiff
path: root/ext/Storable
diff options
context:
space:
mode:
authorMarc Lehmann <pcg@goof.com>2007-04-12 10:41:53 +0200
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-05-10 12:41:08 +0000
commit1651fc447620d3610b694c35696c13530282f981 (patch)
tree482a8b5110d6232c00a8ca636cbf9cec7e723652 /ext/Storable
parentad91da88822a061453a454578ec2246dd493ffdd (diff)
downloadperl-1651fc447620d3610b694c35696c13530282f981.tar.gz
Re: Compress::Zlib, pack "C" and utf-8 [PATCH]
Message-ID: <20070412064153.GA22475@schmorp.de> p4raw-id: //depot/perl@31194
Diffstat (limited to 'ext/Storable')
-rw-r--r--ext/Storable/t/utf8hash.t9
1 files changed, 3 insertions, 6 deletions
diff --git a/ext/Storable/t/utf8hash.t b/ext/Storable/t/utf8hash.t
index eeb80eb86e..a529ea5626 100644
--- a/ext/Storable/t/utf8hash.t
+++ b/ext/Storable/t/utf8hash.t
@@ -34,7 +34,7 @@ use Storable qw(store nstore retrieve thaw freeze);
}
# Better than no plan, because I was getting out of memory errors, at which
# point Test::More tidily prints up 1..79 as if I meant to finish there.
-use Test::More tests=>148;
+use Test::More tests=>144;
use bytes ();
my %utf8hash;
@@ -57,13 +57,10 @@ my @ords = (
foreach my $i (@ords){
my $u = chr($i); utf8::upgrade($u);
# warn sprintf "%d,%d", bytes::length($u), is_utf8($u);
- my $b = pack("C*", unpack("C*", $u));
+ my $b = chr($i); utf8::encode($b);
# warn sprintf "%d,%d" ,bytes::length($b), is_utf8($b);
- isnt($u, $b,
- "equivalence - with utf8flag");
- is (pack("C*", unpack("C*", $u)), pack("C*", unpack("C*", $b)),
- "equivalence - without utf8flag");
+ isnt($u, $b, "equivalence - with utf8flag");
$utf8hash{$u} = $utf8hash{$b} = $i;
}