summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRicardo Signes <rjbs@cpan.org>2013-06-12 15:13:52 -0400
committerRicardo Signes <rjbs@cpan.org>2013-06-13 21:42:44 -0400
commit573d2b1a3b181bcb93a38999bdf4ef9d93863872 (patch)
tree20cfa04fd19afcb400435951a51d01bdefff9c79 /t
parent9152021db0fe677bcc7f8460e5d5419a79462abc (diff)
downloadperl-573d2b1a3b181bcb93a38999bdf4ef9d93863872.tar.gz
fix category on "Statement unlikely to be reached"
The warning is documented as an "exec" category warning, but the implementation mixes checking for exec and syntax. This makes only the exec category apply.
Diffstat (limited to 't')
-rw-r--r--t/lib/warnings/doio4
-rw-r--r--t/lib/warnings/op6
2 files changed, 7 insertions, 3 deletions
diff --git a/t/lib/warnings/doio b/t/lib/warnings/doio
index 37b55e3e77..804161e712 100644
--- a/t/lib/warnings/doio
+++ b/t/lib/warnings/doio
@@ -187,6 +187,8 @@ no warnings 'io' ;
exec "lskdjfalksdjfdjfkls","" ;
EXPECT
OPTION regex
+Statement unlikely to be reached at - line .+
+ \(Maybe you meant system\(\) when you said exec\(\)\?\)
Can't exec "lskdjfalksdjfdjfkls": .+
########
# doio.c [Perl_do_exec3]
@@ -196,6 +198,8 @@ no warnings 'io' ;
exec "lskdjfalksdjfdjfkls", "abc" ;
EXPECT
OPTION regex
+Statement unlikely to be reached at - line .+
+ \(Maybe you meant system\(\) when you said exec\(\)\?\)
Can't exec "lskdjfalksdjfdjfkls(:? abc)?": .+
########
# doio.c [win32_execvp]
diff --git a/t/lib/warnings/op b/t/lib/warnings/op
index 83d3705f56..da550a32d8 100644
--- a/t/lib/warnings/op
+++ b/t/lib/warnings/op
@@ -852,7 +852,7 @@ EXPECT
Hash %FRED missing the % in argument 1 of keys() at - line 2.
########
# op.c
-use warnings 'syntax' ;
+use warnings 'exec' ;
exec "$^X -e 1" ;
my $a
EXPECT
@@ -860,7 +860,7 @@ Statement unlikely to be reached at - line 4.
(Maybe you meant system() when you said exec()?)
########
# op.c, no warning if exec isn't a statement.
-use warnings 'syntax' ;
+use warnings 'exec' ;
$a || exec "$^X -e 1" ;
my $a
EXPECT
@@ -896,7 +896,7 @@ defined(%hash) is deprecated at - line 2.
(Maybe you should just omit the defined()?)
########
# op.c
-no warnings 'syntax' ;
+no warnings 'exec' ;
exec "$^X -e 1" ;
my $a
EXPECT