summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2021-04-30 15:50:43 +0200
committerMiroslav Šulc <fordfrog@gentoo.org>2021-04-30 15:50:59 +0200
commite4fe58906834d266d47526044e24f43e3b1c3966 (patch)
tree79fc5a29f6d32748d9360a5c8a3db1ae8332b316
parentdev-java/htmlcleaner: patched (diff)
downloadgentoo-e4fe58906834d266d47526044e24f43e3b1c3966.tar.gz
gentoo-e4fe58906834d266d47526044e24f43e3b1c3966.tar.bz2
gentoo-e4fe58906834d266d47526044e24f43e3b1c3966.zip
dev-java/htmcleaner: fixed tests
Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
-rw-r--r--dev-java/htmlcleaner/files/htmlcleaner-2.24-fix-tests.patch26
-rw-r--r--dev-java/htmlcleaner/htmlcleaner-2.24.ebuild9
2 files changed, 30 insertions, 5 deletions
diff --git a/dev-java/htmlcleaner/files/htmlcleaner-2.24-fix-tests.patch b/dev-java/htmlcleaner/files/htmlcleaner-2.24-fix-tests.patch
new file mode 100644
index 00000000000..0e10ccee481
--- /dev/null
+++ b/dev-java/htmlcleaner/files/htmlcleaner-2.24-fix-tests.patch
@@ -0,0 +1,26 @@
+diff --git a/src/test/java/org/htmlcleaner/DomSerializerTest.java b/src/test/java/org/htmlcleaner/DomSerializerTest.java
+index b09c6d6..f4e83f0 100644
+--- a/src/test/java/org/htmlcleaner/DomSerializerTest.java
++++ b/src/test/java/org/htmlcleaner/DomSerializerTest.java
+@@ -132,7 +132,7 @@ public class DomSerializerTest extends AbstractHtmlCleanerTest {
+ + "</html>";
+
+ final String expectedOutput =
+- "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n"
++ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ + "<html>\n" +
+ " <head/>\n" +
+ " <body>\n" +
+diff --git a/src/test/java/org/htmlcleaner/TraversalDomSerializerTest.java b/src/test/java/org/htmlcleaner/TraversalDomSerializerTest.java
+index 3e1d1e9..d406c40 100644
+--- a/src/test/java/org/htmlcleaner/TraversalDomSerializerTest.java
++++ b/src/test/java/org/htmlcleaner/TraversalDomSerializerTest.java
+@@ -143,7 +143,7 @@ public class TraversalDomSerializerTest extends AbstractHtmlCleanerTest {
+ + "</html>";
+
+ final String expectedOutput =
+- "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n"
++ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ + "<html>\n" +
+ " <head/>\n" +
+ " <body>\n" +
diff --git a/dev-java/htmlcleaner/htmlcleaner-2.24.ebuild b/dev-java/htmlcleaner/htmlcleaner-2.24.ebuild
index 138bce85abb..72bceb361e0 100644
--- a/dev-java/htmlcleaner/htmlcleaner-2.24.ebuild
+++ b/dev-java/htmlcleaner/htmlcleaner-2.24.ebuild
@@ -35,16 +35,15 @@ BDEPEND="
JAVA_SRC_DIR="src/main/java"
JAVA_GENTOO_CLASSPATH="jdom-2"
+PATCHES=(
+ "${FILESDIR}/${P}-fix-tests.patch"
+)
+
src_prepare() {
default
# Don't require default.xml to be in the current directory.
sed -i "s:\"default\.xml\":\"${JAVA_PKG_SHAREPATH}/default.xml\":g" \
src/main/java/org/htmlcleaner/ConfigFileTagProvider.java || die
-
- sed -i \
- -e '/encoding=/s: standalone.*?>:?><html>:' \
- -e '/\+ \"<html>/d' \
- src/test/java/org/htmlcleaner/{Traversal,}DomSerializerTest.java || die
}
src_configure() {