summaryrefslogtreecommitdiff
path: root/t/io
diff options
context:
space:
mode:
Diffstat (limited to 't/io')
-rwxr-xr-xt/io/open.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/io/open.t b/t/io/open.t
index 300525ac05..09f2611d05 100755
--- a/t/io/open.t
+++ b/t/io/open.t
@@ -12,7 +12,7 @@ use Config;
$Is_VMS = $^O eq 'VMS';
$Is_MacOS = $^O eq 'MacOS';
-plan tests => 99;
+plan tests => 100;
my $Perl = which_perl();
@@ -228,6 +228,11 @@ like( $@, qr/Bad filehandle:\s+afile/, ' right error' );
ok( open(my $stdout, ">&", \*STDOUT), 'dup \*STDOUT into lexical fh');
ok( open(STDOUT, ">&", $stdout), 'restore dupped STDOUT from lexical fh');
+ {
+ use strict; # the below should not warn
+ ok( open(my $stdout, ">&", STDOUT), 'dup STDOUT into lexical fh');
+ }
+
# used to try to open a file [perl #17830]
ok( open(my $stdin, "<&", fileno STDIN), 'dup fileno(STDIN) into lexical fh');
}