PL_scopestack_name needs to be present, -DDEBUGGING or not.
[p5sagit/p5-mst-13.2.git] / ext / re / t / lexical_debug.t
index affa7c5..d4b7e62 100644 (file)
@@ -1,8 +1,6 @@
 #!./perl
 
 BEGIN {
-    chdir 't' if -d 't';
-    @INC = '../lib';
     require Config;
     if (($Config::Config{'extensions'} !~ /\bre\b/) ){
        print "1..0 # Skip -- Perl configured without re module\n";
@@ -11,20 +9,27 @@ BEGIN {
 }
 
 use strict;
-require "./test.pl";
-my $out = runperl(progfile => "../ext/re/t/lexical_debug.pl", stderr => 1 );
 
-print "1..7\n";
+# 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..10\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 <foo>/, "Expect 'foo'");
-ok( $out !~ /EXACT <bar>/, "No 'bar'");
-ok( $out =~ /EXACT <baz>/, "Expect 'baz'");
-ok( $out !~ /EXACT <bop>/, "No 'bop'");
-ok( $out =~ /EXACT <fip>/, "Expect 'fip'");
-ok( $out !~ /EXACT <fop>/, "No 'baz'");
-ok( $out =~ /Count=6\n/,"Count is 6");
+ok( $out =~ /EXACT <foo>/, "Expect 'foo'"    );
+ok( $out !~ /EXACT <bar>/, "No 'bar'"        );
+ok( $out =~ /EXACT <baz>/, "Expect 'baz'"    );
+ok( $out !~ /EXACT <bop>/, "No 'bop'"        );
+ok( $out =~ /EXACT <fip>/, "Expect 'fip'"    );
+ok( $out !~ /EXACT <fop>/, "No 'baz'"        );
+ok( $out =~ /<liz>/,       "Got 'liz'"       ); # in a TRIE so no EXACT
+ok( $out =~ /<zoo>/,       "Got 'zoo'"       ); # in a TRIE so no EXACT
+ok( $out =~ /<zap>/,       "Got 'zap'"       ); # in a TRIE so no EXACT
+ok( $out =~ /Count=7\n/,   "Count is 7") 
+    or diag($out);