Upgrade to Attribute::Handlers 0.87 (which is just a core sync) -- for real
[p5sagit/p5-mst-13.2.git] / ext / re / t / lexical_debug.t
CommitLineData
f9f4320a 1#!./perl
2
3BEGIN {
f9f4320a 4 require Config;
5 if (($Config::Config{'extensions'} !~ /\bre\b/) ){
6 print "1..0 # Skip -- Perl configured without re module\n";
7 exit 0;
8 }
9}
10
11use strict;
1e2e3d02 12
13# must use a BEGIN or the prototypes wont be respected meaning
14 # tests could pass that shouldn't
2adbc9b6 15BEGIN { require "../../t/test.pl"; }
16my $out = runperl(progfile => "t/lexical_debug.pl", stderr => 1 );
f9f4320a 17
1e2e3d02 18print "1..10\n";
f9f4320a 19
20# Each pattern will produce an EXACT node with a specific string in
21# it, so we will look for that. We can't just look for the string
22# alone as the string being matched against contains all of them.
23
1e2e3d02 24ok( $out =~ /EXACT <foo>/, "Expect 'foo'" );
25ok( $out !~ /EXACT <bar>/, "No 'bar'" );
26ok( $out =~ /EXACT <baz>/, "Expect 'baz'" );
27ok( $out !~ /EXACT <bop>/, "No 'bop'" );
28ok( $out =~ /EXACT <fip>/, "Expect 'fip'" );
29ok( $out !~ /EXACT <fop>/, "No 'baz'" );
de734bd5 30ok( $out =~ /<liz>/, "Got 'liz'" ); # in a TRIE so no EXACT
1e2e3d02 31ok( $out =~ /<zoo>/, "Got 'zoo'" ); # in a TRIE so no EXACT
32ok( $out =~ /<zap>/, "Got 'zap'" ); # in a TRIE so no EXACT
33ok( $out =~ /Count=7\n/, "Count is 7")
34 or diag($out);
f9f4320a 35