From f119b0fbc96b5a61f080c4460880e3b51c825650 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Wed, 5 Feb 2003 19:28:37 +0000 Subject: [PATCH] [perl #19767] has become fixed too (by changes #18653 and #18658, methinks), adding the test(s). p4raw-link: @18653 on //depot/perl: d12e50cf45149336efec3161d04293f1ae511ed7 p4raw-id: //depot/perl@18661 --- t/op/pat.t | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/t/op/pat.t b/t/op/pat.t index 5ac1dc1..fe70e12 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -6,7 +6,7 @@ $| = 1; -print "1..986\n"; +print "1..988\n"; BEGIN { chdir 't' if -d 't'; @@ -3090,5 +3090,23 @@ ok("bbbbac" =~ /$pattern/ && $1 eq 'a', "[perl #3547]"); ok( $1 ne "\xC4\x80", '$1 is not non-utf-8' ); } -# last test 986 +{ + use utf8; + my $attr = 'Name-1' ; + + my $NormalChar = qr/[\p{IsDigit}\p{IsLower}\p{IsUpper}]/; + my $NormalWord = qr/${NormalChar}+?/; + my $PredNameHyphen = qr/^${NormalWord}(\-${NormalWord})*?$/; + + $attr =~ /^$/; + ok( $attr =~ $PredNameHyphen, "[perl #19767] original test" ); +} + +{ + use utf8; + "a" =~ m/[b]/; + ok ( "0" =~ /\p{N}+\z/, "[perl #19767] variant test" ); +} + +# last test 988 -- 2.7.4