summaryrefslogtreecommitdiff
path: root/TestInit.pm
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-06-20 10:56:48 +0200
committerNicholas Clark <nick@ccl4.org>2011-06-22 22:41:23 +0200
commitd36b6fc6667cdfc395b53f3d12285777c93dc6a0 (patch)
tree2ce23db6ee9b1bd8d55d1db768d4061c1914b1a8 /TestInit.pm
parent09e28dd9a3526a21d5884f16918aab03c647f01d (diff)
downloadperl-d36b6fc6667cdfc395b53f3d12285777c93dc6a0.tar.gz
Fix a (back)slash bug in a regex, added with the regex itself.
8fcfece7bab67639 added code to TestInit to set the CWD and @INC for tests in ext. However, the regex used to distinguish where a test was had one forward slash where a backslash should have been, hence the intended Win32 support would not work. I'm assuming that no-one has noticed this because no-one has tried to run tests from the command line on Win32 directly, or if they have they always use forward slashes in their pathnames.
Diffstat (limited to 'TestInit.pm')
-rw-r--r--TestInit.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/TestInit.pm b/TestInit.pm
index e7609dae5d..814c99c399 100644
--- a/TestInit.pm
+++ b/TestInit.pm
@@ -60,7 +60,7 @@ sub import {
# 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|dist|cpan)[\\/][^\\/]+)[\//](.*\.t)$!$2!) {
+ if ($0 =~ s!^((?:ext|dist|cpan)[\\/][^\\/]+)[\\/](.*\.t)$!$2!) {
# Looks like a test in ext.
$chdir = $1;
@INC = @up_2_t;