summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl_checker.src/test/read_t.pm1
-rwxr-xr-xperl_checker.src/test/test_it4
2 files changed, 3 insertions, 2 deletions
diff --git a/perl_checker.src/test/read_t.pm b/perl_checker.src/test/read_t.pm
index d7d9b9c..a07c041 100644
--- a/perl_checker.src/test/read_t.pm
+++ b/perl_checker.src/test/read_t.pm
@@ -15,6 +15,7 @@ sub read_t {
} else {
$column_width ||= length(first(/(.{20}\s+)/));
my ($line, $log) = $column_width > 25 && /(.{$column_width})(.*)/ ? (chomp_($1) . "\n", $2) : ($_, '');
+ $line =~ s/[ \t]*$//;
push @lines, $line;
push @logs, $log;
}
diff --git a/perl_checker.src/test/test_it b/perl_checker.src/test/test_it
index 2f7c599..e88607e 100755
--- a/perl_checker.src/test/test_it
+++ b/perl_checker.src/test/test_it
@@ -62,8 +62,8 @@ foreach my $test (@tests) {
pop @l while $l[-1] =~ /^\s*$/;
if (@l == 1) {
- if ($l[-1] !~ /(;|[\s{]\})\s+$/) {
- $l[-1] =~ s/^(.*?)(\s+$)/xxx($1);$2/;
+ if ($l[-1] !~ /(;|[\s{]\})\s*$/) {
+ $l[-1] =~ s/^(.*?)(\s*$)/xxx($1);$2/;
} else {
# no comma for:
# - prefix for/foreach/...