summaryrefslogtreecommitdiff
path: root/t/harness
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-05-10 07:49:26 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-05-10 07:49:26 +0000
commit56eca212f2b30bfbbee425e020ba96a43f99cca5 (patch)
tree607eadc77271d5c95083ea20031a3b3fa851b32c /t/harness
parent8736538c3cff6585c95a01b990d3b3a9e5d5744d (diff)
downloadperl-56eca212f2b30bfbbee425e020ba96a43f99cca5.tar.gz
more Compiler patches from Vishal Bhatia <vishalb@my-dejanews.com>
Date: Tue, 27 Apr 1999 23:47:24 PDT Message-ID: <19990428064724.95244.qmail@hotmail.com> Subject: [PATCH 5.005_56] Saving Tied hashes ( C.pm) -- Date: Thu, 29 Apr 1999 18:21:06 -0700 Message-ID: <GEFPBFDJADFJBAAA@my-dejanews.com> Subject: [PATCH 5.005_56] double constants ( C.pm) -- Date: Mon, 03 May 1999 20:21:31 PDT Message-ID: <19990504032131.81113.qmail@hotmail.com> Subject: [PATCH 5.005_56] Overloading implementation ( Compiler) -- Date: Thu, 06 May 1999 17:57:09 -0700 Message-ID: <FCJELBLAJBOBAAAA@my-dejanews.com> Subject: Stash.pm p4raw-id: //depot/perl@3359
Diffstat (limited to 't/harness')
-rw-r--r--t/harness46
1 files changed, 37 insertions, 9 deletions
diff --git a/t/harness b/t/harness
index 88bcb38fba..174b318576 100644
--- a/t/harness
+++ b/t/harness
@@ -19,15 +19,43 @@ $Test::Harness::verbose = shift if @ARGV && $ARGV[0] eq '-v';
@tests = <base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t lib/*.t> unless @tests;
Test::Harness::runtests @tests;
-
-%infinite = ('comp/require.t', 1, 'op/bop.t', 1, 'lib/hostname.t', 1 );
+exit(0) unless -e "../testcompile";
+
+%infinite = qw(
+ op/bop.t 1
+ lib/hostname.t 1
+ );
+#fudge DATA for now.
+%datahandle = qw(
+ lib/bigint.t 1
+ lib/bigintpm.t 1
+ lib/bigfloat.t 1
+ lib/bigfloatpm.t 1
+ );
+
+my $dhwrapper = <<'EOT';
+open DATA,"<".__FILE__;
+until (($_=<DATA>) =~ /^__END__/) {};
+EOT
@tests = grep (!$infinite{$_}, @tests);
-
-if (-e "../testcompile")
-{
- print "The tests ", join(' ', keys(%infinite)),
- " generate infinite loops! Skipping!\n";
-
- $ENV{'COMPILE_TEST'} = 1; Test::Harness::runtests @tests;
+@tests = map {
+ my $new = $_;
+ if ($datahandle{$_}) {
+ $new .= '.t';
+ local(*F, *T);
+ open(F,"<$_") or die "Can't open $_: $!";
+ open(T,">$new") or die "Can't open $new: $!";
+ print T $dhwrapper, <F>;
+ close F;
+ close T;
+ }
+ $new;
+ } @tests;
+
+print "The tests ", join(' ', keys(%infinite)),
+ " generate infinite loops! Skipping!\n";
+$ENV{'COMPILE_TEST'} = 1; Test::Harness::runtests @tests;
+foreach (keys %datahandle) {
+ unlink "$_.t";
}