mirror of
https://github.com/curl/curl.git
synced 2025-01-18 14:04:30 +08:00
Changed the long logfile elision code in runtests.pl to properly handle
lines ending in \r.
This commit is contained in:
parent
27c282a6ee
commit
932b589780
8
CHANGES
8
CHANGES
@ -6,6 +6,14 @@
|
||||
|
||||
Changelog
|
||||
|
||||
Daniel Fandrich (23 Jul 2008)
|
||||
- Changed the long logfile elision code in runtests.pl to properly handle
|
||||
lines ending in \r.
|
||||
|
||||
- Changed references to TRUE and FALSE in the curl_easy_setopt man page to
|
||||
1 and zero, respectively, since TRUE and FALSE aren't part of the
|
||||
libcurl API.
|
||||
|
||||
Daniel Stenberg (23 Jul 2008)
|
||||
- I went over the curl_easy_setopt man page and replaced most references to
|
||||
non-zero with the fixed value of 1. We should strive at making options
|
||||
|
@ -2963,11 +2963,10 @@ open(CMDLOG, ">$CURLLOG") ||
|
||||
#######################################################################
|
||||
|
||||
# Display the contents of the given file. Line endings are canonicalized
|
||||
# and excessively long files are truncated
|
||||
# and excessively long files are elided
|
||||
sub displaylogcontent {
|
||||
my ($file)=@_;
|
||||
if(open(SINGLE, "<$file")) {
|
||||
my $lfcount;
|
||||
my $linecount = 0;
|
||||
my $truncate;
|
||||
my @tail;
|
||||
@ -2975,29 +2974,17 @@ sub displaylogcontent {
|
||||
$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*\!$//;
|
||||
$linecount++;
|
||||
if ($truncate) {
|
||||
push @tail, " $string\n";
|
||||
} else {
|
||||
logmsg " $string\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
for my $line (split("\n", $string)) {
|
||||
$line =~ s/\s*\!$//;
|
||||
$linecount++;
|
||||
if ($truncate) {
|
||||
push @tail, " $line\n";
|
||||
} else {
|
||||
logmsg " $line\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
$truncate = $linecount > 1000;
|
||||
$string =~ tr/\n//;
|
||||
for my $line (split("\n", $string)) {
|
||||
$line =~ s/\s*\!$//;
|
||||
if ($truncate) {
|
||||
push @tail, " $line\n";
|
||||
} else {
|
||||
logmsg " $line\n";
|
||||
}
|
||||
$linecount++;
|
||||
$truncate = $linecount > 1000;
|
||||
}
|
||||
}
|
||||
if (@tail) {
|
||||
logmsg "=== File too long: lines here were removed\n";
|
||||
|
Loading…
Reference in New Issue
Block a user