diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-11-19 13:14:24 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-11-19 17:13:02 -0700 |
commit | 840f8e9207353b89e0c2790e03fe16f44071615b (patch) | |
tree | 49898c5d54c2715bede005060d81145ea27ace01 /ext | |
parent | a35d759aff667e2ddcde81fae0f6dbaecf27e7b1 (diff) | |
download | perl-840f8e9207353b89e0c2790e03fe16f44071615b.tar.gz |
handy.h: Add isVERTWS_uni(), isVERTWS_utf8()
These two macros match the same things as \v does in patterns. I'm
leaving them undocumented for now.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/XS-APItest/APItest.pm | 2 | ||||
-rw-r--r-- | ext/XS-APItest/APItest.xs | 14 | ||||
-rw-r--r-- | ext/XS-APItest/t/handy.t | 3 |
3 files changed, 18 insertions, 1 deletions
diff --git a/ext/XS-APItest/APItest.pm b/ext/XS-APItest/APItest.pm index 71c9cc18cb..68ec99ca34 100644 --- a/ext/XS-APItest/APItest.pm +++ b/ext/XS-APItest/APItest.pm @@ -5,7 +5,7 @@ use strict; use warnings; use Carp; -our $VERSION = '0.45'; +our $VERSION = '0.46'; require XSLoader; diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs index 8d5b312743..2afbcd03ca 100644 --- a/ext/XS-APItest/APItest.xs +++ b/ext/XS-APItest/APItest.xs @@ -3585,6 +3585,20 @@ test_isBLANK_utf8(unsigned char * p) RETVAL bool +test_isVERTWS_uni(UV ord) + CODE: + RETVAL = isVERTWS_uni(ord); + OUTPUT: + RETVAL + +bool +test_isVERTWS_utf8(unsigned char * p) + CODE: + RETVAL = isVERTWS_utf8(p); + OUTPUT: + RETVAL + +bool test_isUPPER_uni(UV ord) CODE: RETVAL = isUPPER_uni(ord); diff --git a/ext/XS-APItest/t/handy.t b/ext/XS-APItest/t/handy.t index f822b8cc76..9433409d48 100644 --- a/ext/XS-APItest/t/handy.t +++ b/ext/XS-APItest/t/handy.t @@ -28,6 +28,7 @@ my %properties = ( punct => 'XPosixPunct', quotemeta => '_Perl_Quotemeta', space => 'XPerlSpace', + vertws => 'VertSpace', upper => 'Upper', xdigit => 'XDigit', ); @@ -86,6 +87,7 @@ foreach my $name (sort keys %properties) { } next; } + if ($name ne 'vertws') { $ret = truth eval "test_is${function}_A($i)"; if ($@) { fail($@); @@ -102,6 +104,7 @@ foreach my $name (sort keys %properties) { my $truth = truth($matches && $i < 256); is ($ret, $truth, "is${function}_L1( $display_name ) == $truth"); } + } next if $name eq 'alnumc'; $ret = truth eval "test_is${function}_uni($i)"; |