summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-01-31 04:57:42 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-01-31 04:57:42 +0000
commit7e2040f0b7c6fc88ec07b6e169aa2f75fc0130a4 (patch)
treede43e349e9f70e27ef30b2a0de9de2df628cc1c3 /t
parent8004f2ac219abdd8660c02a4a46ed97695dc379d (diff)
downloadperl-7e2040f0b7c6fc88ec07b6e169aa2f75fc0130a4.tar.gz
runtime now looks at the SVf_UTF8 bit on the SV to decide
whether to use widechar semantics; lexer and RE engine continue to need "use utf8" to enable unicode awareness in literals and patterns (TODO: this needs to be fixed); $1 et al are marked SvUTF8 if the pattern was compiled for utf8 (TODO: propagating it from the data is probably better) p4raw-id: //depot/perl@4930
Diffstat (limited to 't')
-rw-r--r--t/pragma/warn/doop4
-rw-r--r--t/pragma/warn/pp5
-rw-r--r--t/pragma/warn/sv6
-rw-r--r--t/pragma/warn/utf89
4 files changed, 6 insertions, 18 deletions
diff --git a/t/pragma/warn/doop b/t/pragma/warn/doop
index cce6bdc07c..c16e24f919 100644
--- a/t/pragma/warn/doop
+++ b/t/pragma/warn/doop
@@ -1,6 +1,6 @@
doop.c AOK
- Malformed UTF-8 character
+ \x%s will produce malformed UTF-8 character; use \x{%s} for that
__END__
@@ -9,7 +9,6 @@ use utf8 ;
$_ = "\x80 \xff" ;
chop ;
EXPECT
-Malformed UTF-8 character at - line 4.
########
# doop.c
BEGIN {
@@ -28,4 +27,3 @@ chop ;
EXPECT
\x80 will produce malformed UTF-8 character; use \x{80} for that at - line 10.
\xff will produce malformed UTF-8 character; use \x{ff} for that at - line 10.
-Malformed UTF-8 character at - line 11.
diff --git a/t/pragma/warn/pp b/t/pragma/warn/pp
index eb09e059ba..4c70fd5d6f 100644
--- a/t/pragma/warn/pp
+++ b/t/pragma/warn/pp
@@ -30,7 +30,8 @@
Mandatory Warnings
------------------
- Malformed UTF-8 character
+ Malformed UTF-8 character (not tested: difficult to produce with
+ perl now)
__END__
# pp.c
@@ -109,7 +110,6 @@ use utf8 ;
$_ = "\x80 \xff" ;
reverse ;
EXPECT
-Malformed UTF-8 character at - line 4.
########
# pp.c
BEGIN {
@@ -128,4 +128,3 @@ reverse ;
EXPECT
\x80 will produce malformed UTF-8 character; use \x{80} for that at - line 10.
\xff will produce malformed UTF-8 character; use \x{ff} for that at - line 10.
-Malformed UTF-8 character at - line 11.
diff --git a/t/pragma/warn/sv b/t/pragma/warn/sv
index 97d61bca17..cdec48e2c2 100644
--- a/t/pragma/warn/sv
+++ b/t/pragma/warn/sv
@@ -38,8 +38,8 @@
Mandatory Warnings
------------------
- Malformed UTF-8 character [sv_pos_b2u]
- my $a = rindex "a\xff bc ", "bc" ;
+ Malformed UTF-8 character [sv_pos_b2u] (not tested: difficult to produce
+ with perl now)
Mandatory Warnings TODO
------------------
@@ -286,8 +286,6 @@ $^W =0 ;
my $a = rindex "a\xff bc ", "bc" ;
EXPECT
\xff will produce malformed UTF-8 character; use \x{ff} for that at - line 12.
-Malformed UTF-8 character at - line 12.
-Malformed UTF-8 character at - line 16.
########
# sv.c
use warnings 'misc';
diff --git a/t/pragma/warn/utf8 b/t/pragma/warn/utf8
index 19b8d1db3a..cb1f202b8d 100644
--- a/t/pragma/warn/utf8
+++ b/t/pragma/warn/utf8
@@ -1,14 +1,13 @@
utf8.c AOK
- All Mandatory warnings
-
[utf8_to_uv]
Malformed UTF-8 character
my $a = ord "\x80" ;
Malformed UTF-8 character
my $a = ord "\xf080" ;
+ <<<<<< this warning can't be easily triggered from perl anymore
[utf16_to_utf8]
Malformed UTF-16 surrogate
@@ -19,7 +18,6 @@ __END__
use utf8 ;
my $a = ord "\x80" ;
EXPECT
-Malformed UTF-8 character at - line 3.
########
# utf8.c [utf8_to_uv]
BEGIN {
@@ -37,15 +35,12 @@ my $a = ord "\x80" ;
my $a = ord "\x80" ;
}
EXPECT
-Malformed UTF-8 character at - line 9.
\x80 will produce malformed UTF-8 character; use \x{80} for that at - line 12.
-Malformed UTF-8 character at - line 12.
########
# utf8.c [utf8_to_uv]
use utf8 ;
my $a = ord "\xf080" ;
EXPECT
-Malformed UTF-8 character at - line 3.
########
# utf8.c [utf8_to_uv]
BEGIN {
@@ -63,6 +58,4 @@ my $a = ord "\xf080" ;
my $a = ord "\xf080" ;
}
EXPECT
-Malformed UTF-8 character at - line 9.
\xf0 will produce malformed UTF-8 character; use \x{f0} for that at - line 12.
-Malformed UTF-8 character at - line 12.