summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-07-07 08:07:58 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-07-07 08:07:58 +0000
commit1b18133a105fbc5f80d40c868e5dcd6642b2283a (patch)
treed099e5888df0f35505f032e1fd83689b932df6c0 /t
parent61123c315f37e918851a84240eafd9ae275821d7 (diff)
parentc4be5b273ea01a42f8bea870c9703dc3eaa652b6 (diff)
downloadperl-1b18133a105fbc5f80d40c868e5dcd6642b2283a.tar.gz
Integrate with Sarathy.
p4raw-id: //depot/cfgperl@3638
Diffstat (limited to 't')
-rw-r--r--t/harness37
-rw-r--r--t/pragma/warn/pp_hot18
-rw-r--r--t/pragma/warn/pp_sys8
3 files changed, 46 insertions, 17 deletions
diff --git a/t/harness b/t/harness
index ead3ebea15..c46a87090c 100644
--- a/t/harness
+++ b/t/harness
@@ -15,23 +15,38 @@ use Test::Harness;
$Test::Harness::switches = ""; # Too much noise otherwise
$Test::Harness::verbose = shift if @ARGV && $ARGV[0] eq '-v';
+#fudge DATA for now.
+%datahandle = qw(
+ lib/bigint.t 1
+ lib/bigintpm.t 1
+ lib/bigfloat.t 1
+ lib/bigfloatpm.t 1
+ op/gv.t 1
+ lib/complex.t 1
+ lib/ph.t 1
+ lib/soundex.t 1
+ op/misc.t 1
+ op/runlevel.t 1
+ op/tie.t 1
+ op/lex_assign.t 1
+ pragma/subs.t 1
+ );
+
+foreach (keys %datahandle) {
+ unlink "$_.t";
+}
+
@tests = @ARGV;
@tests = <base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t lib/*.t> unless @tests;
Test::Harness::runtests @tests;
exit(0) unless -e "../testcompile";
-#fudge DATA for now.
%infinite = qw (
- op/bop.t 1
- lib/hostname.t 1
- );
-
-%datahandle = qw(
- lib/bigint.t 1
- lib/bigintpm.t 1
- lib/bigfloat.t 1
- lib/bigfloatpm.t 1
+ op/bop.t 1
+ lib/hostname.t 1
+ op/lex_assign.t 1
+ lib/ph.t 1
);
my $dhwrapper = <<'EOT';
@@ -42,7 +57,7 @@ EOT
@tests = grep (!$infinite{$_}, @tests);
@tests = map {
my $new = $_;
- if ($datahandle{$_}) {
+ if ($datahandle{$_} && !( -f $new.t) ) {
$new .= '.t';
local(*F, *T);
open(F,"<$_") or die "Can't open $_: $!";
diff --git a/t/pragma/warn/pp_hot b/t/pragma/warn/pp_hot
index c78b2667e6..817c0c89d6 100644
--- a/t/pragma/warn/pp_hot
+++ b/t/pragma/warn/pp_hot
@@ -6,6 +6,8 @@
Filehandle %s opened only for input
print STDIN "abc" ;
+ Filehandle %s opened only for output
+ print <STDOUT> ;
print on closed filehandle %s
close STDIN ; print STDIN "abc" ;
@@ -22,7 +24,7 @@
Reference found where even-sized list expected
$X = [ 1 ..3 ];
- Read on closed filehandle <%s>
+ Read on closed filehandle %s
close STDIN ; $a = <STDIN>;
Deep recursion on subroutine \"%s\"
@@ -42,8 +44,20 @@ Filehandle main::abc never opened at - line 4.
# pp_hot.c
use warning 'io' ;
print STDIN "anc";
+print <STDOUT>;
+print <STDERR>;
+open(FOO, ">&STDOUT") and print <FOO>;
+print getc(STDERR);
+print getc(FOO);
+read(FOO,$_,1);
EXPECT
Filehandle main::STDIN opened only for input at - line 3.
+Filehandle main::STDOUT opened only for output at - line 4.
+Filehandle main::STDERR opened only for output at - line 5.
+Filehandle main::FOO opened only for output at - line 6.
+Filehandle main::STDERR opened only for output at - line 7.
+Filehandle main::FOO opened only for output at - line 8.
+Filehandle main::FOO opened only for output at - line 9.
########
# pp_hot.c
use warning 'closed' ;
@@ -82,7 +96,7 @@ Reference found where even-sized list expected at - line 3.
use warning 'closed' ;
close STDIN ; $a = <STDIN> ;
EXPECT
-Read on closed filehandle <STDIN> at - line 3.
+Read on closed filehandle main::STDIN at - line 3.
########
# pp_hot.c
use warning 'recursion' ;
diff --git a/t/pragma/warn/pp_sys b/t/pragma/warn/pp_sys
index 8f2c255bc3..82d1501147 100644
--- a/t/pragma/warn/pp_sys
+++ b/t/pragma/warn/pp_sys
@@ -3,12 +3,12 @@
untie attempted while %d inner references still exist
sub TIESCALAR { bless [] } ; tie $a, 'main'; untie $a ;
- Filehandle only opened for input
+ Filehandle %s opened only for input
format STDIN =
.
write STDIN;
- Write on closed filehandle
+ Write on closed filehandle %s
format STDIN =
.
close STDIN;
@@ -91,7 +91,7 @@ format STDIN =
.
write STDIN;
EXPECT
-Filehandle only opened for input at - line 5.
+Filehandle main::STDIN opened only for input at - line 5.
########
# pp_sys.c
use warning 'closed' ;
@@ -100,7 +100,7 @@ format STDIN =
close STDIN;
write STDIN;
EXPECT
-Write on closed filehandle at - line 6.
+Write on closed filehandle main::STDIN at - line 6.
########
# pp_sys.c
use warning 'io' ;