X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcomp%2Frequire.t;h=581dcba75ca0434c184e402965d3f6aa08234d35;hb=562a7b0c67b6218259506760bd4728f2f0c6093b;hp=203b996e068d3905d2cd62f6dfc9041ef6d65658;hpb=4a9ae47ac2dbde43455079cf404946a27c7b4906;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/comp/require.t b/t/comp/require.t index 203b996..581dcba 100755 --- a/t/comp/require.t +++ b/t/comp/require.t @@ -2,7 +2,7 @@ BEGIN { chdir 't' if -d 't'; - @INC = ('.'); + unshift @INC, ('.', '../lib'); } # don't make this lexical @@ -35,7 +35,9 @@ print "ok ",$i++,"\n"; # compile-time failure in require do_require "1)\n"; -print "# $@\nnot " unless $@ =~ /syntax error/i; +# bison says 'parse error' instead of 'syntax error', +# various yaccs may or may not capitalize 'syntax'. +print "# $@\nnot " unless $@ =~ /(syntax|parse) error/mi; print "ok ",$i++,"\n"; # successful require @@ -43,7 +45,7 @@ do_require "1"; print "# $@\nnot " if $@; print "ok ",$i++,"\n"; -END { unlink 'bleah.pm'; } +END { 1 while unlink 'bleah.pm'; } # ***interaction with pod (don't put any thing after here)***