From: Nick Ing-Simmons Date: Mon, 27 May 2002 11:02:21 +0000 (+0000) Subject: Add IO::Scalar fail case to the tests. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6751fbc4613da48d58726f127239e6f792ac8c57;p=p5sagit%2Fp5-mst-13.2.git Add IO::Scalar fail case to the tests. p4raw-id: //depot/perlio@16809 --- diff --git a/t/op/tie.t b/t/op/tie.t index 309656d..d147f6b 100755 --- a/t/op/tie.t +++ b/t/op/tie.t @@ -135,7 +135,7 @@ untie %h; EXPECT ######## -# strict error behaviour, with 2 extra references +# strict error behaviour, with 2 extra references use warnings 'untie'; use Tie::Hash ; $a = tie %h, Tie::StdHash; @@ -184,13 +184,17 @@ EXPECT # Allowed glob self-ties my $destroyed = 0; +my $printed = 0; sub Self2::TIEHANDLE { bless $_[1], $_[0] } sub Self2::DESTROY { $destroyed = 1; } +sub Self2::PRINT { $printed = 1; } { use Symbol; my $c = gensym; tie *$c, 'Self2', $c; + print $c 'Hello'; } +die "self-tied glob not PRINTed" unless $printed == 1; die "self-tied glob not DESTROYd" unless $destroyed == 1; EXPECT ########