summaryrefslogtreecommitdiff
path: root/t/lib/warnings/pp_sys
diff options
context:
space:
mode:
Diffstat (limited to 't/lib/warnings/pp_sys')
-rw-r--r--t/lib/warnings/pp_sys26
1 files changed, 26 insertions, 0 deletions
diff --git a/t/lib/warnings/pp_sys b/t/lib/warnings/pp_sys
index 0dd3efea7a..2e9c613b02 100644
--- a/t/lib/warnings/pp_sys
+++ b/t/lib/warnings/pp_sys
@@ -494,3 +494,29 @@ chdir() on unopened filehandle FOO at - line 20.
chdir() on closed filehandle BAR at - line 21.
chdir() on unopened filehandle $dh at - line 22.
chdir() on closed filehandle $fh at - line 23.
+########
+# pp_sys.c [pp_open]
+use warnings;
+opendir FOO, ".";
+opendir my $foo, ".";
+open FOO, "TEST";
+open $foo, "TEST";
+no warnings qw(io deprecated);
+open FOO, "TEST";
+open $foo, "TEST";
+EXPECT
+Opening dirhandle FOO also as a file at - line 5.
+Opening dirhandle $foo also as a file at - line 6.
+########
+# pp_sys.c [pp_open_dir]
+use warnings;
+open FOO, "TEST";
+open my $foo, "TEST";
+opendir FOO, ".";
+opendir $foo, ".";
+no warnings qw(io deprecated);
+opendir FOO, ".";
+opendir $foo, ".";
+EXPECT
+Opening filehandle FOO also as a directory at - line 5.
+Opening filehandle $foo also as a directory at - line 6.