Patch by Gerard Goosen to avoid building man pages for extensions
[p5sagit/p5-mst-13.2.git] / ext / re / t / lexical_debug.t
CommitLineData
f9f4320a 1#!./perl
2
3BEGIN {
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
13use strict;
1e2e3d02 14
15# must use a BEGIN or the prototypes wont be respected meaning
16 # tests could pass that shouldn't
17BEGIN { require "./test.pl"; }
f9f4320a 18my $out = runperl(progfile => "../ext/re/t/lexical_debug.pl", stderr => 1 );
19
1e2e3d02 20print "1..10\n";
f9f4320a 21
22# Each pattern will produce an EXACT node with a specific string in
23# it, so we will look for that. We can't just look for the string
24# alone as the string being matched against contains all of them.
25
1e2e3d02 26ok( $out =~ /EXACT <foo>/, "Expect 'foo'" );
27ok( $out !~ /EXACT <bar>/, "No 'bar'" );
28ok( $out =~ /EXACT <baz>/, "Expect 'baz'" );
29ok( $out !~ /EXACT <bop>/, "No 'bop'" );
30ok( $out =~ /EXACT <fip>/, "Expect 'fip'" );
31ok( $out !~ /EXACT <fop>/, "No 'baz'" );
de734bd5 32ok( $out =~ /<liz>/, "Got 'liz'" ); # in a TRIE so no EXACT
1e2e3d02 33ok( $out =~ /<zoo>/, "Got 'zoo'" ); # in a TRIE so no EXACT
34ok( $out =~ /<zap>/, "Got 'zap'" ); # in a TRIE so no EXACT
35ok( $out =~ /Count=7\n/, "Count is 7")
36 or diag($out);
f9f4320a 37