diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-06-04 14:41:25 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-06-04 14:46:22 -0600 |
commit | a8c75f4be1d24785526e639ef648a2b7906a61cc (patch) | |
tree | 20e13fdbb743c0f0167c36e6fe10516e57e6e11f /t | |
parent | 40c94d11f196fbff790bdeedf21d0c2c8896eb52 (diff) | |
download | perl-a8c75f4be1d24785526e639ef648a2b7906a61cc.tar.gz |
Add tests for [perl #87908]
Diffstat (limited to 't')
-rw-r--r-- | t/re/reg_posixcc.t | 14 |
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'}){ |