]> git.sesse.net Git - xml-template/blobdiff - tests/xml-diff.pl
Actually output the error when we get one.
[xml-template] / tests / xml-diff.pl
index 22b828ae4f14782770f3de60feb28411a616b38a..023ce1345f397e21ea7a54011e2b882ce89f8080 100644 (file)
@@ -69,8 +69,14 @@ sub compare {
                $d1 =~ s/\s+$//;
                $d2 =~ s/\s+$//;
 
+               # compress other whitespace
+               $d1 =~ s/\n/ /g;
+               $d1 =~ s/ +/ /g;
+               $d2 =~ s/\n/ /g;
+               $d2 =~ s/ +/ /g;
+
                if ($d1 ne $d2) {
-                       print STDERR "$nsuri1/$lname1 has differing textual content\n";
+                       print STDERR "$nsuri1/$lname1 has differing textual content ('$d1' vs. '$d2')\n";
                        exit(1);
                }
        }