diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-08-01 16:32:52 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-08-01 16:32:52 +0000 |
commit | df646e84f898ad88193e38b6a680d118688bafa2 (patch) | |
tree | f75f317670912a20f94d7bb644e7138bdb5632f8 /t | |
parent | f89e79d6a67c9c5a3944abe05fb62bcb8dbf4f08 (diff) | |
download | perl-df646e84f898ad88193e38b6a680d118688bafa2.tar.gz |
Test for change #11536.
p4raw-link: @11536 on //depot/perl: af68e658651cf56700790e24ea04a752928b0df4
p4raw-id: //depot/perl@11539
Diffstat (limited to 't')
-rwxr-xr-x | t/op/tiehandle.t | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/t/op/tiehandle.t b/t/op/tiehandle.t index b04bdb7897..cb9a290de6 100755 --- a/t/op/tiehandle.t +++ b/t/op/tiehandle.t @@ -77,7 +77,7 @@ package main; use Symbol; -print "1..33\n"; +print "1..35\n"; my $fh = gensym; @@ -165,3 +165,27 @@ ok($r == 1); $r = print STDERR @expect[2,3]; ok($r == 1); } + +{ + # Test for change #11536 + package Foo; + use strict; + sub TIEHANDLE { bless {} } + my $cnt = 'a'; + sub READ { + $_[1] = $cnt++; + 1; + } + sub do_read { + my $fh = shift; + read $fh, my $buff, 1; + main::ok(1); + } + $|=1; + tie *STDIN, 'Foo'; + read STDIN, my $buff, 1; + main::ok(1); + do_read(\*STDIN); + untie *STDIN; +} + |