diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-09 01:32:05 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-09 01:32:05 +0000 |
commit | def8e4ea8caaa1180102a74b7613845e72bcb26c (patch) | |
tree | b89977a658198bea14463e7cc7e5462c97ec9bd6 /t/op/pat.t | |
parent | 1472e7de75222b97d63995edd75ecee5ae79b468 (diff) | |
download | perl-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-x | t/op/pat.t | 20 |
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"; +} |