summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
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');
}
+