diff options
author | Karl Williamson <khw@cpan.org> | 2018-02-18 21:30:17 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-02-18 22:00:33 -0700 |
commit | e7206367046d4f58fd12d34816a357cc5535a02f (patch) | |
tree | eb6db72dfaf6a5d0551d4c6af00a37648650e0ab /t/re/alpha_assertions.t | |
parent | d97906123bcd8c325c65db4f67e8c96e2cdafaec (diff) | |
download | perl-e7206367046d4f58fd12d34816a357cc5535a02f.tar.gz |
Add alphabetic synonyms for regex assertions
This commit came out of the committee formed with PCRE members as a
result of http://nntp.perl.org/group/perl.perl5.porters/246762
Diffstat (limited to 't/re/alpha_assertions.t')
-rw-r--r-- | t/re/alpha_assertions.t | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/t/re/alpha_assertions.t b/t/re/alpha_assertions.t new file mode 100644 index 0000000000..3d28bbcdd2 --- /dev/null +++ b/t/re/alpha_assertions.t @@ -0,0 +1,18 @@ +#!./perl + +use strict; +use warnings; +no warnings 'once'; + +# This tests that the alphabetic assertions, like '(*atomic:...) work +# It just sets a flag and calls regexp.t which will run through its test +# suite, modifiying the tests to use the alphabetic synonyms. + +BEGIN { $::alpha_assertions = 1; } +for my $file ('./re/regexp.t', './t/re/regexp.t', ':re:regexp.t') { + if (-r $file) { + do $file or die $@; + exit; + } +} +die "Cannot find ./re/regexp.t or ./t/re/regexp.t\n"; |