From: Nicholas Clark Date: Mon, 31 Aug 2009 20:46:48 +0000 (+0100) Subject: Anchor a regexp, else paths including /Text/ are mistaken for tests in ext/ X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=25a883e141ef5022e3a9afb466f7bc525d011947;p=p5sagit%2Fp5-mst-13.2.git Anchor a regexp, else paths including /Text/ are mistaken for tests in ext/ --- diff --git a/TestInit.pm b/TestInit.pm index c626965..73bd8cf 100644 --- a/TestInit.pm +++ b/TestInit.pm @@ -59,7 +59,7 @@ if (-f 't/TEST' && -f 'MANIFEST' && -d 'lib' && -d 'ext') { # We're being run from the top level. Try to change directory, and set # things up correctly. This is a 90% solution, but for hand-running tests, # that's good enough - if ($0 =~ s!(ext[\\/][^\\/]+)[\//](.*\.t)$!$2!) { + if ($0 =~ s!^(ext[\\/][^\\/]+)[\//](.*\.t)$!$2!) { # Looks like a test in ext. chdir $1 or die "Can't chdir '$1': $!"; new_inc(@up_2_t);