summaryrefslogtreecommitdiff
path: root/t/lib
diff options
context:
space:
mode:
Diffstat (limited to 't/lib')
-rw-r--r--t/lib/warnings/doio16
-rw-r--r--t/lib/warnings/pp_sys17
2 files changed, 31 insertions, 2 deletions
diff --git a/t/lib/warnings/doio b/t/lib/warnings/doio
index 9ba4d31633..0db1a1315c 100644
--- a/t/lib/warnings/doio
+++ b/t/lib/warnings/doio
@@ -36,6 +36,8 @@
warn(warn_nl, "lstat"); [Perl_my_lstat]
lstat "ab\ncd"
+ Use of -l on filehandle %s [Perl_my_lstat]
+
Can't exec \"%s\": %s [Perl_do_aexec5]
Can't exec \"%s\": %s [Perl_do_exec3]
@@ -154,6 +156,20 @@ EXPECT
Unsuccessful stat on filename containing newline at - line 3.
Unsuccessful stat on filename containing newline at - line 4.
########
+# doio.c [Perl_my_stat]
+use warnings 'io';
+-l STDIN;
+-l $fh;
+open $fh, $0 or die "# $!";
+-l $fh;
+no warnings 'io';
+-l STDIN;
+-l $fh;
+close $fh;
+EXPECT
+Use of -l on filehandle STDIN at - line 3.
+Use of -l on filehandle $fh at - line 6.
+########
# doio.c [Perl_do_aexec5]
use warnings 'io' ;
exec "lskdjfalksdjfdjfkls","" ;
diff --git a/t/lib/warnings/pp_sys b/t/lib/warnings/pp_sys
index 4b9c8b1a96..57abd6986d 100644
--- a/t/lib/warnings/pp_sys
+++ b/t/lib/warnings/pp_sys
@@ -96,8 +96,8 @@
my $file = "./xcv" ;
open(F, ">$file") ;
my $a = sysread(F, $a,10) ;
-
-
+
+ lstat on filehandle %s [pp_lstat]
__END__
# pp_sys.c [pp_untie]
@@ -396,3 +396,16 @@ $a = "BLERG";binmode($a);
EXPECT
binmode() on unopened filehandle BLARG at - line 3.
binmode() on unopened filehandle at - line 4.
+########
+# pp_sys.c [pp_lstat]
+use warnings 'io';
+lstat STDIN;
+open my $fh, $0 or die "# $!";
+lstat $fh;
+no warnings 'io';
+lstat STDIN;
+lstat $fh;
+close $fh;
+EXPECT
+lstat() on filehandle STDIN at - line 3.
+lstat() on filehandle $fh at - line 5.