summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/re/re.pm2
-rw-r--r--ext/re/t/intflags.pl16
-rw-r--r--ext/re/t/intflags.t25
-rw-r--r--ext/re/t/lexical_debug.t2
4 files changed, 43 insertions, 2 deletions
diff --git a/ext/re/re.pm b/ext/re/re.pm
index cf1f7421a2..6da4e02f32 100644
--- a/ext/re/re.pm
+++ b/ext/re/re.pm
@@ -4,7 +4,7 @@ package re;
use strict;
use warnings;
-our $VERSION = "0.43";
+our $VERSION = "0.44";
our @ISA = qw(Exporter);
our @EXPORT_OK = qw{
is_regexp regexp_pattern
diff --git a/ext/re/t/intflags.pl b/ext/re/t/intflags.pl
new file mode 100644
index 0000000000..a79180681e
--- /dev/null
+++ b/ext/re/t/intflags.pl
@@ -0,0 +1,16 @@
+use re 'Debug' => qw(DUMP FLAGS);
+our $count;
+my $code= '(?{$count++})';
+my @p= (
+ qr/(foo)(?1)?/,
+ qr/\Gfoo/,
+ qr/.*foo/,
+ qr/^foo/,
+ qr/(foo(*THEN)bar|food)/,
+ qr/a.*b.*/,
+ qr/a{1,4}\Gfoo/,
+ qr/a+/,
+ do { use re 'eval'; qr/a$code/},
+);
+
+print STDERR "-OK-\n";
diff --git a/ext/re/t/intflags.t b/ext/re/t/intflags.t
new file mode 100644
index 0000000000..256bf1f007
--- /dev/null
+++ b/ext/re/t/intflags.t
@@ -0,0 +1,25 @@
+#!./perl
+
+BEGIN {
+ require Config;
+ if (($Config::Config{'extensions'} !~ /\bre\b/) ){
+ print "1..0 # Skip -- Perl configured without re module\n";
+ exit 0;
+ }
+}
+
+use strict;
+
+# must use a BEGIN or the prototypes wont be respected meaning
+# tests could pass that shouldn't.
+BEGIN { require "../../t/test.pl"; }
+my $out = runperl(progfile => "t/intflags.pl", stderr => 1 );
+like($out,qr/-OK-\n/, "intflags.pl ran to completion");
+
+my %seen;
+foreach my $line (split /\n/, $out) {
+ $line=~s/^r->intflags:\s+// or next;
+ length($_) and $seen{$_}++ for split /\s+/, $line;
+}
+is(0+keys %seen,14);
+done_testing;
diff --git a/ext/re/t/lexical_debug.t b/ext/re/t/lexical_debug.t
index b2570f0e2d..4c8b47d54f 100644
--- a/ext/re/t/lexical_debug.t
+++ b/ext/re/t/lexical_debug.t
@@ -11,7 +11,7 @@ BEGIN {
use strict;
# must use a BEGIN or the prototypes wont be respected meaning
- # tests could pass that shouldn't
+# tests could pass that shouldn't
BEGIN { require "../../t/test.pl"; }
my $out = runperl(progfile => "t/lexical_debug.pl", stderr => 1 );