...
 
Commits (3)
libhtmlcleaner-java (2.21-3) unstable; urgency=medium
* Add patch to fix test suite with java9 (Closes: #895899).
* Update standards version to 4.1.4 (nothing to do).
-- Alexandre Rossi <alexandre.rossi@gmail.com> Tue, 24 Apr 2018 09:39:05 +0200
libhtmlcleaner-java (2.21-2) unstable; urgency=medium
* Mention src/test/resources/test23.html in debian/copyright
......
......@@ -7,7 +7,7 @@ Build-Depends-Indep:
libmaven-javadoc-plugin-java,
libmaven-bundle-plugin-java,
libjdom2-java
Standards-Version: 4.1.3.0
Standards-Version: 4.1.4.0
Homepage: http://htmlcleaner.sourceforge.net/
Vcs-Browser: https://salsa.debian.org/debian/libhtmlcleaner-java
Vcs-Git: https://salsa.debian.org/debian/libhtmlcleaner-java.git
......
Author: Alexandre Rossi <alexandre.rossi@gmail.com>
Description: Fix testsuite with java9
javax.xml.transform.Transformer changed behaviour with java9 in a way that
makes its output indented with 4 spaces. This is not what the test suite
expects. This patchs works around this problem.
index 8ea96df..b762c7c 100644
--- a/src/test/java/org/htmlcleaner/AbstractHtmlCleanerTest.java
+++ b/src/test/java/org/htmlcleaner/AbstractHtmlCleanerTest.java
@@ -99,7 +99,7 @@ public abstract class AbstractHtmlCleanerTest {
Transformer transformer = tf.newTransformer();
transformer.transform(new DOMSource(document), new StreamResult(writer));
String actual = writer.getBuffer().toString();
- actual = actual.substring(actual.indexOf("<body>\n")+7, actual.indexOf("\n</body>"));
+ actual = actual.substring(actual.indexOf("<body>\n")+7, actual.indexOf("</body>")).trim();
assertEquals(expected, actual);
cleaner.getProperties().setOmitHtmlEnvelope(true);
}
fix-tests-with-java9