From b30707e4885ca231ff72a496671faa7830e8002a Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 9 Aug 2004 18:10:42 +0000 Subject: merge 5.8.5 into HEAD remove now-unused files crank libperl shared library major number update Makefile.bsd-wrapper tweak openbsd hints file for arm and m68k --- gnu/usr.bin/perl/lib/utf8.t | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'gnu/usr.bin/perl/lib/utf8.t') diff --git a/gnu/usr.bin/perl/lib/utf8.t b/gnu/usr.bin/perl/lib/utf8.t index 33cd5966af5..576d90e5a81 100644 --- a/gnu/usr.bin/perl/lib/utf8.t +++ b/gnu/usr.bin/perl/lib/utf8.t @@ -37,7 +37,7 @@ no utf8; # Ironic, no? # # -plan tests => 143; +plan tests => 145; { # bug id 20001009.001 @@ -409,3 +409,19 @@ 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"); +} + +{ + my $a = "456\xb6"; + utf8::upgrade($a); + + my $b = "123456\xb6"; + $b =~ s/^...//; + utf8::upgrade($b); + is($b, $a, "utf8::upgrade OffsetOK"); +} -- cgit v1.2.3