summaryrefslogtreecommitdiff
path: root/t/op/pat.t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-01-09 01:32:05 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-09 01:32:05 +0000
commitdef8e4ea8caaa1180102a74b7613845e72bcb26c (patch)
treeb89977a658198bea14463e7cc7e5462c97ec9bd6 /t/op/pat.t
parent1472e7de75222b97d63995edd75ecee5ae79b468 (diff)
downloadperl-def8e4ea8caaa1180102a74b7613845e72bcb26c.tar.gz
SANY (. with /s) wasn't happy on Unicode.
p4raw-id: //depot/perl@14143
Diffstat (limited to 't/op/pat.t')
-rwxr-xr-xt/op/pat.t20
1 files changed, 19 insertions, 1 deletions
diff --git a/t/op/pat.t b/t/op/pat.t
index a504186332..6f33f15498 100755
--- a/t/op/pat.t
+++ b/t/op/pat.t
@@ -6,7 +6,7 @@
$| = 1;
-print "1..843\n";
+print "1..845\n";
BEGIN {
chdir 't' if -d 't';
@@ -2620,3 +2620,21 @@ print "# some Unicode properties\n";
print "<\x{2029}>" =~ /<\s>/ ? "ok 843\n" : "not ok 843\n";
}
+{
+ print "# . with /s should work on characters, not bytes\n";
+
+ my $s = "\x{e4}\x{100}";
+
+ # This is not expected to match: the point is that
+ # neither should we get "Malformed UTF-8" warnings.
+ print $s =~ /\G(.+?)\n/gcs ?
+ "not ok 844\n" : "ok 844\n";
+
+ my @c;
+
+ while ($s =~ /\G(.)/gs) {
+ push @c, $1;
+ }
+
+ print join("", @c) eq $s ? "ok 845\n" : "not ok 845\n";
+}