diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-02-18 09:09:23 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-02-18 09:09:23 +0000 |
commit | 8e0fc1cdff8c4d07f11a5b0bd5056e1acbe2a68a (patch) | |
tree | c7d95e9bbfd3c0939227d3924b847be78177ffed /t | |
parent | cb36c7826069e46f7a72e79cb6e038763e4c7ca8 (diff) | |
download | perl-8e0fc1cdff8c4d07f11a5b0bd5056e1acbe2a68a.tar.gz |
Integrate mainline
p4raw-id: //depot/perlio@14740
Diffstat (limited to 't')
-rwxr-xr-x | t/io/open.t | 1 | ||||
-rwxr-xr-x | t/op/tiehandle.t | 17 |
2 files changed, 15 insertions, 3 deletions
diff --git a/t/io/open.t b/t/io/open.t index cb8aea371f..f49ba10c49 100755 --- a/t/io/open.t +++ b/t/io/open.t @@ -201,7 +201,6 @@ EOC ok( !eval { open local $f, '<&', 'afile'; 1 }, 'local <& on non-filehandle'); like( $@, qr/Bad filehandle:\s+afile/, ' right error' ); - { local *F; for (1..2) { diff --git a/t/op/tiehandle.t b/t/op/tiehandle.t index 7ae33514c9..257a613958 100755 --- a/t/op/tiehandle.t +++ b/t/op/tiehandle.t @@ -77,7 +77,7 @@ package main; use Symbol; -print "1..38\n"; +print "1..39\n"; my $fh = gensym; @@ -160,7 +160,7 @@ ok($r == 1); use warnings; # Special case of aliasing STDERR, which used # to dump core when warnings were enabled - *STDERR = *$fh; + local *STDERR = *$fh; @expect = (PRINT => $ob,"some","text"); $r = print STDERR @expect[2,3]; ok($r == 1); @@ -217,3 +217,16 @@ ok($r == 1); sub TIEARRAY {bless {}} } +{ + # warnings should pass to the PRINT method of tied STDERR + my @received; + + local *STDERR = *$fh; + local *Implement::PRINT = sub { @received = @_ }; + + $r = warn("some", "text", "\n"); + @expect = (PRINT => $ob,"sometext\n"); + + Implement::compare(PRINT => @received); +} + |