diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-16 17:38:53 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-16 17:38:53 +0000 |
commit | 7a3152049c3b11217c72b149c0293284b6993763 (patch) | |
tree | ce4b8b45d64ebc2639247336f0d453b672db1cbd /t/harness | |
parent | ee96af8ff6e9f715a42440fa2eb3e1834eb07e91 (diff) | |
download | perl-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/harness | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -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"; |