summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-06-04 14:41:25 -0600
committerKarl Williamson <public@khwilliamson.com>2011-06-04 14:46:22 -0600
commita8c75f4be1d24785526e639ef648a2b7906a61cc (patch)
tree20e13fdbb743c0f0167c36e6fe10516e57e6e11f /t
parent40c94d11f196fbff790bdeedf21d0c2c8896eb52 (diff)
downloadperl-a8c75f4be1d24785526e639ef648a2b7906a61cc.tar.gz
Add tests for [perl #87908]
Diffstat (limited to 't')
-rw-r--r--t/re/reg_posixcc.t14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/re/reg_posixcc.t b/t/re/reg_posixcc.t
index aa7f445201..d37411be38 100644
--- a/t/re/reg_posixcc.t
+++ b/t/re/reg_posixcc.t
@@ -97,6 +97,20 @@ while (@pats) {
$got{"[$no]"}{$type} = $str=~/[$no]/ ? 1 : 0;
$got{"[^$yes]"}{$type} = $str=~/[^$yes]/ ? 1 : 0;
$got{"[^$no]"}{$type} = $str=~/[^$no]/ ? 1 : 0;
+
+ # For \w, \s, and \d, also test without being in character
+ # classes.
+ next if $yes =~ /\[/;
+
+ # The rest of this .t was written when there were many test
+ # failures, so it goes to some lengths to summarize things. Now
+ # those are fixed, so these missing tests just do standard
+ # procedures
+
+ my $chr = chr($b);
+ utf8::upgrade $chr if $type eq 'unicode';
+ ok (($chr =~ /$yes/) != ($chr =~ /$no/),
+ "$type: chr($display_b) isn't both $yes and $no");
}
foreach my $which ("[$yes]","[$no]","[^$yes]","[^$no]") {
if ($got{$which}{'unicode'} != $got{$which}{'not-unicode'}){