summaryrefslogtreecommitdiff
path: root/lib/utf8.t
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utf8.t')
-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");
+}