summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2004-03-07 21:34:01 +0000
committerNicholas Clark <nick@ccl4.org>2004-03-07 21:34:01 +0000
commit5fec3b1d36062f79cb996123dc191025c139d617 (patch)
tree6e5d309c1f9d0eda77a6f40e73c290a0a156ca66 /lib
parent076d9a11d18d650bf0992032a42c6e83fb1c2ea6 (diff)
downloadperl-5fec3b1d36062f79cb996123dc191025c139d617.tar.gz
Add a readonly check to Perl_sv_utf8_upgrade_flags, a regresion test
in utf8.t, and fix 3 bugs it exposed in utfhash.t p4raw-id: //depot/perl@22463
Diffstat (limited to 'lib')
-rw-r--r--lib/utf8.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/utf8.t b/lib/utf8.t
index 33cd5966af..90035e56b3 100644
--- a/lib/utf8.t
+++ b/lib/utf8.t
@@ -37,7 +37,7 @@ no utf8; # Ironic, no?
#
#
-plan tests => 143;
+plan tests => 144;
{
# bug id 20001009.001
@@ -409,3 +409,9 @@ SKIP: {
ok( utf8::is_utf8($b), " utf8::is_utf8 beyond"); # $b stays in UTF-8.
ok( utf8::is_utf8($c), " utf8::is_utf8 unicode");
}
+
+{
+ eval {utf8::encode("£")};
+ like($@, qr/^Modification of a read-only value attempted/,
+ "utf8::encode should refuse to touch read-only values");
+}