summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/test/test_it
diff options
context:
space:
mode:
Diffstat (limited to 'perl_checker.src/test/test_it')
-rwxr-xr-xperl_checker.src/test/test_it4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl_checker.src/test/test_it b/perl_checker.src/test/test_it
index 85214b7..fc2e70f 100755
--- a/perl_checker.src/test/test_it
+++ b/perl_checker.src/test/test_it
@@ -65,7 +65,9 @@ foreach my $test (@tests) {
if ($l[-1] !~ /(;|[\s{]\})\s+$/) {
$l[-1] =~ s/^(.*?)(\s+$)/xxx($1);$2/;
} else {
- $l[-1] =~ s/(\s+$)/; nop();$1/;
+ my $no_comma = $l[-1] =~ /(^\s*(for|foreach|if|unless|while|sub)\s)|(;\s+$)/;
+ my $opt_comma = $no_comma ? '' : ';';
+ $l[-1] =~ s/(\s+$)/$opt_comma nop();$1/;
}
}
if (! any { /^(sub|use) / } @l) {