summaryrefslogtreecommitdiff
path: root/runtests.pl
diff options
context:
space:
mode:
authorKārlis Gaņģis <Knagis@users.noreply.github.com>2014-09-10 00:11:35 +0300
committerKārlis Gaņģis <Knagis@users.noreply.github.com>2014-09-10 00:11:35 +0300
commit3567b844ca1fd7bec62801f8758545f7bd5cbaae (patch)
tree8007bc0bb05ec4fce97bc66f792a058c8e3909a7 /runtests.pl
parent80d01efafda1be0fd6a013eb590dde637f10616b (diff)
Moved removal of `\r` into `tidy()`
Diffstat (limited to 'runtests.pl')
-rw-r--r--runtests.pl10
1 files changed, 4 insertions, 6 deletions
diff --git a/runtests.pl b/runtests.pl
index d847140..f3e91ca 100644
--- a/runtests.pl
+++ b/runtests.pl
@@ -38,7 +38,9 @@ sub tidy
} elsif (/<\/pre/) {
$inpre = 0;
}
- if ($inpre) {
+ # remove \r to allow mixing linux/windows newlines
+ s/\r//;
+ if ($inpre) {
print $outfh $_;
} else {
# remove leading spaces
@@ -79,11 +81,7 @@ sub dotest
$html = &tidy($html);
$actual = &tidy($actual);
$actual =~ s/\&#39;/'/;
-
- # remove \r to allow mixing of linux/windows newlines
- $actual =~ s/\r//g;
- $html =~ s/\r//g;
-
+
if ($actual eq $html) {
print colored("✓", "green");
return 1;