#!./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/lexical_debug.pl", stderr => 1 ); print "1..12\n"; # Each pattern will produce an EXACT node with a specific string in # it, so we will look for that. We can't just look for the string # alone as the string being matched against contains all of them. ok( $out =~ /EXACT /, "Expect 'foo'" ); ok( $out !~ /EXACT /, "No 'bar'" ); ok( $out =~ /EXACT /, "Expect 'baz'" ); ok( $out !~ /EXACT /, "No 'bop'" ); ok( $out =~ /EXACT /, "Expect 'boq'" ); ok( $out !~ /EXACT /, "No 'bor'" ); ok( $out =~ /EXACT /, "Expect 'fip'" ); ok( $out !~ /EXACT /, "No 'baz'" ); ok( $out =~ //, "Got 'liz'" ); # in a TRIE so no EXACT ok( $out =~ //, "Got 'zoo'" ); # in a TRIE so no EXACT ok( $out =~ //, "Got 'zap'" ); # in a TRIE so no EXACT ok( $out =~ /Count=9\n/, "Count is 9") or diag($out);