Re: [PATCH] Add hook for re_dup() into regex engine as reg_dupe (make re pluggable...
[p5sagit/p5-mst-13.2.git] / ext / re / t / lexical_debug.t
1 #!./perl
2
3 BEGIN {
4     chdir 't' if -d 't';
5     @INC = '../lib';
6     require Config;
7     if (($Config::Config{'extensions'} !~ /\bre\b/) ){
8         print "1..0 # Skip -- Perl configured without re module\n";
9         exit 0;
10     }
11 }
12
13 use strict;
14 require "./test.pl";
15 my $out = runperl(progfile => "../ext/re/t/lexical_debug.pl", stderr => 1 );
16
17 print "1..7\n";
18
19 # Each pattern will produce an EXACT node with a specific string in 
20 # it, so we will look for that. We can't just look for the string
21 # alone as the string being matched against contains all of them.
22
23 ok( $out =~ /EXACT <foo>/, "Expect 'foo'");
24 ok( $out !~ /EXACT <bar>/, "No 'bar'");
25 ok( $out =~ /EXACT <baz>/, "Expect 'baz'");
26 ok( $out !~ /EXACT <bop>/, "No 'bop'");
27 ok( $out =~ /EXACT <fip>/, "Expect 'fip'");
28 ok( $out !~ /EXACT <fop>/, "No 'baz'");
29 ok( $out =~ /Count=6\n/,"Count is 6");
30