aboutsummaryrefslogtreecommitdiff
path: root/tests/runtests.pl
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-04-05 00:14:27 +0000
committerYang Tse <yangsita@gmail.com>2007-04-05 00:14:27 +0000
commit70f9a13ecba74a1e59e7f563706efce369261ec0 (patch)
treea8775bcfd2fa3b8c1e9935cd82dee5083dfb028f /tests/runtests.pl
parentc321b9f7046e96aa269635d9deafa357a118e88c (diff)
Further improve displaying of individual logfiles
Diffstat (limited to 'tests/runtests.pl')
-rwxr-xr-xtests/runtests.pl21
1 files changed, 17 insertions, 4 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index a6ba2012c..f365beaf8 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -2426,10 +2426,23 @@ open(CMDLOG, ">$CURLLOG") ||
sub displaylogcontent {
my ($file)=@_;
if(open(my $SINGLE, "<$file")) {
- while(my $line = <$SINGLE>) {
- chomp $line;
- $line =~ s/\s*\!$//;
- logmsg " $line\n";
+ my $lfcount;
+ while(my $string = <$SINGLE>) {
+ $string =~ s/\r\n/\n/g;
+ $string =~ s/[\r\f\032]/\n/g;
+ $string .= "\n" unless ($string =~ /\n$/);
+ $lfcount = $string =~ tr/\n//;
+ if($lfcount == 1) {
+ $string =~ s/\n//;
+ $string =~ s/\s*\!$//;
+ logmsg " $string\n";
+ }
+ else {
+ for my $line (split("\n", $string)) {
+ $line =~ s/\s*\!$//;
+ logmsg " $line\n";
+ }
+ }
}
close($SINGLE);
}