summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-04-13 15:54:37 -0600
committerKarl Williamson <khw@cpan.org>2015-03-14 22:41:09 -0600
commit2e90857c3f14d52c46c4c7aeffea29ac190f4bee (patch)
treebbb269d59abe335439763edb4146c505d2360eba /lib
parent2e0cc28bf7e269882cee7ee7f88f6ba259eb9ec3 (diff)
downloadperl-2e90857c3f14d52c46c4c7aeffea29ac190f4bee.tar.gz
lib/DBM_Filter/t/encode.t: Generalize for non-ASCII platforms
This still has a failure due to Encode issues. A future commit will skip some failing tests until that is fixed.
Diffstat (limited to 'lib')
-rw-r--r--lib/DBM_Filter/t/encode.t22
1 files changed, 6 insertions, 16 deletions
diff --git a/lib/DBM_Filter/t/encode.t b/lib/DBM_Filter/t/encode.t
index d7a8ef233f..35f501aa55 100644
--- a/lib/DBM_Filter/t/encode.t
+++ b/lib/DBM_Filter/t/encode.t
@@ -3,6 +3,7 @@ use strict;
use warnings;
use Carp;
+require "../t/charset_tools.pl";
BEGIN
{
@@ -97,25 +98,14 @@ my $db2 = tie(%h2, $db_file,'Op_dbmx', O_RDWR|O_CREAT, 0640) ;
ok $db2, "tied to $db_file";
-if (ord('A') == 193) { # EBCDIC.
- VerifyData(\%h2,
+VerifyData(\%h2,
{
- 'alpha' => "\xB4\x58",
- 'beta' => "\xB4\x59",
- "\xB4\x62"=> "gamma",
- "\x65\x75\x72\x6F" => "\xA4",
+ 'alpha' => byte_utf8a_to_utf8n("\xCE\xB1"),
+ 'beta' => byte_utf8a_to_utf8n("\xCE\xB2"),
+ byte_utf8a_to_utf8n("\xCE\xB3") => "gamma",
+ 'euro' => uni_to_native("\xA4"),
"" => "",
});
-} else {
- VerifyData(\%h2,
- {
- 'alpha' => "\xCE\xB1",
- 'beta' => "\xCE\xB2",
- "\xCE\xB3"=> "gamma",
- 'euro' => "\xA4",
- "" => "",
- });
-}
undef $db2;
{