summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-11-25 15:58:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-11-25 15:58:26 +0000
commitacd30220688c4ece7f7cdf372b094277dcac8677 (patch)
tree03b19bcd2e19f9418405c81ea8a73cbfa9745ecf
parente1bc7a05a6e605f1281ea86d10b39241ecb25093 (diff)
downloadperl-MDK-Common-acd30220688c4ece7f7cdf372b094277dcac8677.tar
perl-MDK-Common-acd30220688c4ece7f7cdf372b094277dcac8677.tar.gz
perl-MDK-Common-acd30220688c4ece7f7cdf372b094277dcac8677.tar.bz2
perl-MDK-Common-acd30220688c4ece7f7cdf372b094277dcac8677.tar.xz
perl-MDK-Common-acd30220688c4ece7f7cdf372b094277dcac8677.zip
enhance to have no remaining spaces
-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/...