summaryrefslogtreecommitdiff
path: root/t/uni
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-04-13 14:41:46 -0600
committerKarl Williamson <khw@cpan.org>2015-03-05 21:48:26 -0700
commit1157e7160df3349dcc06ff44f1ec37daf8be7a9c (patch)
treecc13af439d694b0571c50fc76cf2ceb0db9fe8a8 /t/uni
parent73676ccb48c0c7233e12ac8f20195e9e4926bf2c (diff)
downloadperl-1157e7160df3349dcc06ff44f1ec37daf8be7a9c.tar.gz
t/uni/method.t: Extend to EBCDIC platforms
I couldn't figure out a way to not use the hard-coded values
Diffstat (limited to 't/uni')
-rw-r--r--t/uni/method.t17
1 files changed, 13 insertions, 4 deletions
diff --git a/t/uni/method.t b/t/uni/method.t
index 129a011df5..4a12e3d587 100644
--- a/t/uni/method.t
+++ b/t/uni/method.t
@@ -7,7 +7,7 @@
BEGIN {
chdir 't' if -d 't';
@INC = qw(. ../lib ../cpan/parent/lib);
- require "./test.pl";
+ require "./test.pl"; require './charset_tools.pl';
}
use strict;
@@ -184,12 +184,21 @@ ok(ฟọ::バッズ->new, 'parent using -norequire, in a UTF-8 package.');
ok(ฟọ::バッズ->nèw, 'Also works with UTF-8 methods');
ok(ฟọ::バッズ->ニュー, 'Even methods from an UTF-8 parent');
-BEGIN {no strict 'refs'; ++${"\xff::foo"} } # autovivify the package
+BEGIN {no strict 'refs';
+ ++${"\xff::foo"} if $::IS_ASCII;
+ ++${"\xdf::foo"} if $::IS_EBCDIC;
+ } # autovivify the package
package ÿ { # without UTF8
sub AUTOLOAD {
- ::is our $AUTOLOAD,
+ if ($::IS_ASCII) {
+ ::is our $AUTOLOAD,
"\xff::\x{100}", '$AUTOLOAD made from Latin1 package + UTF8 sub';
- }
+ }
+ else {
+ ::is our $AUTOLOAD,
+ "\xdf::\x{100}", '$AUTOLOAD made from Latin1 package + UTF8 sub';
+ }
+ }
}
ÿ->${\"\x{100}"};