From: Jarkko Hietaniemi Date: Fri, 4 Jan 2002 03:13:50 +0000 (+0000) Subject: Add U+0085, U+2028, and U+2029 to \s under Unicode. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d8f6a7325d6b2ec46e8cdc1ec4b5e1ad4a86abd0;p=p5sagit%2Fp5-mst-13.2.git Add U+0085, U+2028, and U+2029 to \s under Unicode. p4raw-id: //depot/perl@14052 --- diff --git a/lib/unicore/Is/SpacePerl.pl b/lib/unicore/Is/SpacePerl.pl index 3866aee..cc8f50a 100644 --- a/lib/unicore/Is/SpacePerl.pl +++ b/lib/unicore/Is/SpacePerl.pl @@ -5,6 +5,7 @@ return <<'END'; 0009 000A 000C 000D 0020 +0085 00A0 1680 2000 200B diff --git a/lib/unicore/mktables b/lib/unicore/mktables index 34d1388..067af24 100644 --- a/lib/unicore/mktables +++ b/lib/unicore/mktables @@ -134,7 +134,7 @@ sub gencat { ||= [], $code); # 005F: SPACING UNDERSCORE $op->($Cat->{Word} ||= [], $code) - if $cat =~ /^[LMN]/ or $code eq "005F"; + if $cat =~ /^[LMN]/ || $code eq "005F"; $op->($Cat->{Alnum} ||= [], $code) if $cat =~ /^[LMN]/; $op->($Cat->{Alpha} ||= [], $code) @@ -149,7 +149,7 @@ sub gencat { if $cat =~ /^Z/ || $code =~ /^(0009|000A|000B|000C|000D)$/; $op->($Cat->{SpacePerl} ||= [], $code) - if $cat =~ /^Z/ || + if $cat =~ /^Z/ || $code =~ /^(?:0085|2028|2029)$/ || $code =~ /^(0009|000A|000C|000D)$/; $op->($Cat->{Blank} ||= [], $code) if $code =~ /^(0020|0009)$/ || diff --git a/t/op/pat.t b/t/op/pat.t index 969e2cd..bc2ed37 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -6,7 +6,7 @@ $| = 1; -print "1..840\n"; +print "1..843\n"; BEGIN { chdir 't' if -d 't'; @@ -2609,3 +2609,13 @@ print "# some Unicode properties\n"; # print "SS" =~ # /[\N{LATIN SMALL LETTER SHARP S}]/i ? "ok 842\n" : "not ok 842\n"; } + +{ + print "# more whitespace: U+0085, U+2028, U+2029\n"; + + # U+0085 needs to be forced to be Unicode, the \x{100} does that. + print "<\x{100}\x{0085}>" =~ /<\x{100}\s>/ ? "ok 841\n" : "not ok 841\n"; + print "<\x{2028}>" =~ /<\s>/ ? "ok 842\n" : "not ok 842\n"; + print "<\x{2029}>" =~ /<\s>/ ? "ok 843\n" : "not ok 843\n"; +} +