From: Vincent Pit Date: Wed, 27 Aug 2008 21:26:52 +0000 (+0200) Subject: Test global filehandles X-Git-Tag: v0.02~9 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=a0ade8a080a0ebf61171ee3082183cd2e53f59af;p=perl%2Fmodules%2Fsubs-auto.git Test global filehandles --- diff --git a/t/10-base.t b/t/10-base.t index 12e758e..70a8985 100644 --- a/t/10-base.t +++ b/t/10-base.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 59; +use Test::More tests => 60; my %_re = ( bareword => sub { qr/^Bareword\s+['"]?\s*$_[0]\s*['"]?\s+not\s+allowed\s+while\s+["']?\s*strict\s+subs\s*['"]?\s+in\s+use\s+at\s+$_[1]\s+line\s+$_[2]/ }, @@ -244,3 +244,9 @@ sub yay { @yay = @_; '::yay' } # eval "meh"; # _got_undefined('meh', 1, eval => 1, todo => 'Fails because of some bug in perl or Variable::Magic'); } + +my $buf = ''; +open DONGS, '>', \$buf or die "open-in-memory: $!"; +print DONGS "hlagh\n"; +is($buf, "hlagh\n", 'filehandles should\'t be touched'); +close DONGS;