From: Nicholas Clark Date: Sat, 26 Sep 2009 14:09:05 +0000 (+0100) Subject: Tests in cpan/ should run from their directory, as tests in ext/ already do. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e41cfb922e9f5e5fe67bebd36742e255a7813fc3;p=p5sagit%2Fp5-mst-13.2.git Tests in cpan/ should run from their directory, as tests in ext/ already do. --- diff --git a/t/TEST b/t/TEST index b1eedc8..094011e 100755 --- a/t/TEST +++ b/t/TEST @@ -34,9 +34,9 @@ my %temp_no_core = '../ext/Compress-Raw-Bzip2' => 1, '../ext/Compress-Raw-Zlib' => 1, '../ext/Devel-PPPort' => 1, - '../ext/Getopt-Long' => 1, + '../cpan/Getopt-Long' => 1, '../ext/IO-Compress' => 1, - '../ext/IPC-SysV' => 1, + '../cpan/IPC-SysV' => 1, '../ext/Math-BigInt' => 1, '../ext/Math-BigRat' => 1, '../ext/MIME-Base64' => 1, @@ -194,7 +194,7 @@ sub _scan_test { my $dir = $1; my $testswitch = $dir_to_switch{$dir}; if (!defined $testswitch) { - if ($test =~ s!^(\.\./ext/[^/]+)/t!t!) { + if ($test =~ s!^(\.\./(?:cpan|ext)/[^/]+)/t!t!) { $run_dir = $1; $return_dir = '../../t'; $lib = '../../lib'; @@ -345,7 +345,7 @@ sub _tests_from_manifest { my $mani = '../MANIFEST'; if (open(MANI, $mani)) { while () { - if (m!^(ext/(\S+)/+(?:[^/\s]+\.t|test\.pl)|lib/\S+?(?:\.t|test\.pl))\s!) { + if (m!^((?:cpan|ext)/(\S+)/+(?:[^/\s]+\.t|test\.pl)|lib/\S+?(?:\.t|test\.pl))\s!) { my $t = $1; my $extension = $2; if (!$::core || $t =~ m!^lib/[a-z]!) {