diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-03-26 07:17:17 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-03-26 07:17:17 +0000 |
commit | 621fdfbe1ddec6f73d55f0cf5d3c8327a9d4bde4 (patch) | |
tree | f7875b5937097678a63d409b2fb5663530c609c5 /t | |
parent | ba3ba901f02d8427ffebbeeafc252f221603cc66 (diff) | |
parent | bc70e9ec8f314f418ac6609e3bca318dc04babb9 (diff) | |
download | perl-621fdfbe1ddec6f73d55f0cf5d3c8327a9d4bde4.tar.gz |
Integrate mainline
p4raw-id: //depot/perlio@15513
Diffstat (limited to 't')
-rwxr-xr-x | t/io/open.t | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/t/io/open.t b/t/io/open.t index f49ba10c49..fa8b10ac6c 100755 --- a/t/io/open.t +++ b/t/io/open.t @@ -10,7 +10,7 @@ $| = 1; use warnings; $Is_VMS = $^O eq 'VMS'; -plan tests => 95; +plan tests => 91; my $Perl = which_perl(); @@ -216,16 +216,10 @@ like( $@, qr/Bad filehandle:\s+afile/, ' right error' ); } } -# magic temporary file via 3 arg open with undef -{ - ok( open(my $x,"+<",undef), 'magic temp file via 3 arg open with undef'); - ok( defined fileno($x), ' fileno' ); - - select $x; - ok( (print "ok\n"), ' print' ); - select STDOUT; - ok( seek($x,0,0), ' seek' ); - is( scalar <$x>, "ok\n", ' readline' ); - ok( tell($x) >= 3, ' tell' ); +# other dupping techniques +{ + ok( open(my $stdout, ">&", \*STDOUT), 'dup \*STDOUT into lexical fh'); + ok( open(STDOUT, ">&", $stdout), 'restore dupped STDOUT from lexical fh'); } + |