summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorBrian Fraser <fraserbn@gmail.com>2011-12-13 19:32:48 -0300
committerFather Chrysostomos <sprout@cpan.org>2011-12-15 20:13:28 -0800
commitd47f310d69da3356f76ded4c14c2770d5f1325f4 (patch)
tree4145aee67b224fcdcc499e9d8b0b174b678fc2b8 /t
parent5dca8ed9d28127c9f7a2e7ce5f8ba970da3608cd (diff)
downloadperl-d47f310d69da3356f76ded4c14c2770d5f1325f4.tar.gz
pp_hot.c: First letter of latin-1 classnames wasn't being checked correctly.
Previously the first letter for latin-1 classnames was being mischecked, only allowing ASCII, which caused an instance of the Unicode Bug for downgradable classnames.
Diffstat (limited to 't')
-rw-r--r--t/uni/package.t19
1 files changed, 18 insertions, 1 deletions
diff --git a/t/uni/package.t b/t/uni/package.t
index 317ddd4b7a..bb9092bff7 100644
--- a/t/uni/package.t
+++ b/t/uni/package.t
@@ -6,7 +6,7 @@ BEGIN {
require './test.pl';
}
-plan (tests => 16);
+plan (tests => 18);
use utf8;
use open qw( :utf8 :std );
@@ -92,3 +92,20 @@ ok 1, "sanity check. If we got this far, UTF-8 in package names is legal.";
eval q[package ᕘ {];
like $@, qr/\AMissing right curly /, "comp/package_block.t test";
}
+
+# perl #105922
+
+{
+ my $latin_1 = "þackage";
+ my $utf8 = "þackage";
+ utf8::downgrade($latin_1);
+ utf8::upgrade($utf8);
+
+ local $@;
+ eval { $latin_1->can("yadda") };
+ ok(!$@, "latin1->meth works");
+
+ local $@;
+ eval { $utf8->can("yadda") };
+ ok(!$@, "utf8->meth works");
+}