summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2010-03-02 20:39:28 +0000
committerDavid Mitchell <davem@iabyn.com>2010-03-02 20:39:28 +0000
commitec34a119ad469e892fc0cee78efb6514a9168462 (patch)
tree63c953ac6819340926b1deb08565d49dc61f0ac1 /lib
parentfe442cc01a8e621ba5ee6f71c0b2797bcdf4639a (diff)
downloadperl-ec34a119ad469e892fc0cee78efb6514a9168462.tar.gz
[perl #73174] swash_init() wasn't saving %^H
Diffstat (limited to 'lib')
-rw-r--r--lib/charnames.t19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/charnames.t b/lib/charnames.t
index f74453ded7..50c23f3413 100644
--- a/lib/charnames.t
+++ b/lib/charnames.t
@@ -15,7 +15,7 @@ require File::Spec;
$| = 1;
-print "1..79\n";
+print "1..80\n";
use charnames ':full';
@@ -342,6 +342,23 @@ if ($@) {
print "not " unless "\N{U+1D0C5}" eq "\N{BYZANTINE MUSICAL SYMBOL FTHORA SKLIRON CHROMA VASIS}";
print "ok 79\n";
+# [perl #73174] use of \N{FOO} used to reset %^H
+
+{
+ use charnames ":full";
+ my $res;
+ BEGIN { $^H{73174} = "foo" }
+ BEGIN { $res = ($^H{73174} // "") }
+ # forces loading of utf8.pm, which used to reset %^H
+ $res .= '-1' if ":" =~ /\N{COLON}/i;
+ BEGIN { $res .= '-' . ($^H{73174} // "") }
+ $res .= '-' . ($^H{73174} // "");
+ $res .= '-2' if ":" =~ /\N{COLON}/;
+ $res .= '-3' if ":" =~ /\N{COLON}/i;
+ print $res eq "foo-foo-1--2-3" ? "" : "not ",
+ "ok 80 - \$^H{foo} correct after /\\N{bar}/i (res=$res)\n";
+}
+
__END__
# unsupported pragma
use charnames ":scoobydoo";