summaryrefslogtreecommitdiff
path: root/t/harness
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-06-16 17:38:53 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-16 17:38:53 +0000
commit7a3152049c3b11217c72b149c0293284b6993763 (patch)
treece4b8b45d64ebc2639247336f0d453b672db1cbd /t/harness
parentee96af8ff6e9f715a42440fa2eb3e1834eb07e91 (diff)
downloadperl-7a3152049c3b11217c72b149c0293284b6993763.tar.gz
Make t/TEST and t/harness to test also the t/ tests
under the main lib/ and ext/ directories. Fix Test::Harness to dynamically change the width of its "foo/bar....ok" output. p4raw-id: //depot/perl@10634
Diffstat (limited to 't/harness')
-rw-r--r--t/harness19
1 files changed, 17 insertions, 2 deletions
diff --git a/t/harness b/t/harness
index 3cacc59337..d5335e7296 100644
--- a/t/harness
+++ b/t/harness
@@ -36,8 +36,23 @@ foreach (keys %datahandle) {
unlink "$_.t";
}
-@tests = @ARGV;
-@tests = <base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t lib/*.t pod/*.t> unless @tests;
+if (@ARGV) {
+ @tests = @ARGV;
+} else {
+ @tests = <base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t lib/*.t pod/*.t> unless @tests;
+ use File::Spec;
+ my $updir = File::Spec->updir;
+ my $mani = File::Spec->catdir(File::Spec->updir, "MANIFEST");
+ if (open(MANI, $mani)) {
+ while (<MANI>) {
+ if (m!^((?:ext|lib)/.+/t/[^/]+\.t)\s!) {
+ push @tests, File::Spec->catdir($updir, $1);
+ }
+ }
+ } else {
+ warn "$0: cannot open $mani: $!\n";
+ }
+}
Test::Harness::runtests @tests;
exit(0) unless -e "../testcompile";