summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/test
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
commit4e990ed92226f64ec268fe6b627ec3c72ea212bb (patch)
treeb884e41d5004d8a68c6fa89b3434d8939a679043 /perl_checker.src/test
parent6f49e86bed1ff1de26d1861adb1d2485a4f2bcc3 (diff)
downloadperl_checker-4e990ed92226f64ec268fe6b627ec3c72ea212bb.tar
perl_checker-4e990ed92226f64ec268fe6b627ec3c72ea212bb.tar.gz
perl_checker-4e990ed92226f64ec268fe6b627ec3c72ea212bb.tar.bz2
perl_checker-4e990ed92226f64ec268fe6b627ec3c72ea212bb.tar.xz
perl_checker-4e990ed92226f64ec268fe6b627ec3c72ea212bb.zip
enhance to have no remaining spaces
Diffstat (limited to 'perl_checker.src/test')
-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/...