summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2002-03-26 07:17:17 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2002-03-26 07:17:17 +0000
commit621fdfbe1ddec6f73d55f0cf5d3c8327a9d4bde4 (patch)
treef7875b5937097678a63d409b2fb5663530c609c5 /t
parentba3ba901f02d8427ffebbeeafc252f221603cc66 (diff)
parentbc70e9ec8f314f418ac6609e3bca318dc04babb9 (diff)
downloadperl-621fdfbe1ddec6f73d55f0cf5d3c8327a9d4bde4.tar.gz
Integrate mainline
p4raw-id: //depot/perlio@15513
Diffstat (limited to 't')
-rwxr-xr-xt/io/open.t18
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');
}
+