Compare commits

...

No commits in common. "c8-stream-201902" and "stream-javapackages-tools-202201-rhel-9.1.0" have entirely different histories.

10 changed files with 335 additions and 217 deletions

14
.gitignore vendored
View File

@ -1 +1,13 @@
SOURCES/xmlunit-2.6.3-src.tar.gz /results_*
/*.src.rpm
/xmlunit1.0.zip
/xmlunit-1.3-src.zip
/xmlunit-1.4-src.zip
/xmlunit-1.5-src.zip
/xmlunit-1.6-src.zip
/xmlunit-2.6.2-src.tar.gz
/xmlunit-2.6.3-src.tar.gz
/xmlunit-2.7.0-src.tar.gz
/xmlunit-2.8.2-src.tar.gz
/xmlunit-2.8.2.tar.gz

View File

@ -1 +0,0 @@
19d9c8df1d4645d59e15a27e978370964fd45030 SOURCES/xmlunit-2.6.3-src.tar.gz

View File

@ -0,0 +1,183 @@
From 81808e548ddc6cf0a3cc12285f48caa2bd517a07 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Mon, 4 Mar 2019 14:52:59 +0100
Subject: [PATCH 1/3] Disable tests requiring network access
---
.../org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java | 2 ++
.../java/org/xmlunit/assertj3/XmlAssertValidationTest.java | 6 ++++++
.../org/xmlunit/assertj3/XmlAssertValueByXPathTest.java | 2 ++
.../org/custommonkey/xmlunit/test_AbstractNodeTester.java | 2 +-
.../org/custommonkey/xmlunit/test_DifferenceEngine.java | 2 +-
.../org/custommonkey/xmlunit/test_NewDifferenceEngine.java | 2 +-
.../test/java/org/custommonkey/xmlunit/test_Validator.java | 2 +-
.../java/org/xmlunit/matchers/ValidationMatcherTest.java | 2 ++
8 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java
index 166633e..926c647 100644
--- a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java
+++ b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java
@@ -13,6 +13,7 @@
*/
package org.xmlunit.assertj3;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
@@ -43,6 +44,7 @@ public void testAssertThat_withNull_shouldFailed() {
}
@Test
+ @Ignore
public void testNodesByXPath_withNull_shouldFailed() {
thrown.expectAssertionError(format("%nExpecting not blank but was:<null>"));
diff --git a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java
index d4f1e82..027e7e9 100644
--- a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java
+++ b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java
@@ -14,6 +14,7 @@
package org.xmlunit.assertj3;
import org.junit.ClassRule;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.xmlunit.TestResources;
@@ -91,6 +92,7 @@ public void testIsValidAgainst_withBrokenXml_shouldFailed() {
}
@Test
+ @Ignore
public void testIsValidAgainst_withEmptySourcesArray_shouldPass() {
StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "BookXsdGenerated.xml"));
@@ -100,6 +102,7 @@ public void testIsValidAgainst_withEmptySourcesArray_shouldPass() {
}
@Test
+ @Ignore
public void testIsValidAgainst_withBrokenXmlAndEmptySourcesArray_shouldFailed() {
thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" +
@@ -112,6 +115,7 @@ public void testIsValidAgainst_withBrokenXmlAndEmptySourcesArray_shouldFailed()
}
@Test
+ @Ignore
public void testIsValid_shouldPass() {
StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "BookXsdGenerated.xml"));
@@ -120,6 +124,7 @@ public void testIsValid_shouldPass() {
}
@Test
+ @Ignore
public void testIsValid_withBrokenXml_shouldPass() {
thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" +
@@ -140,6 +145,7 @@ public void testIsInvalid_withBrokenXml_shouldPass() {
}
@Test
+ @Ignore
public void testIsInvalid_shouldField() {
thrown.expectAssertionErrorPattern("^\\nExpecting:\\n <.*"
diff --git a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java
index 7ac9a3f..3cb825b 100644
--- a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java
+++ b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java
@@ -14,6 +14,7 @@
package org.xmlunit.assertj3;
import org.junit.ClassRule;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.xmlunit.assertj3.util.SetEnglishLocaleRule;
@@ -31,6 +32,7 @@ public class XmlAssertValueByXPathTest {
public static SetEnglishLocaleRule locale = new SetEnglishLocaleRule();
@Test
+ @Ignore
public void testValueByXPath_withNull_shouldFailed() {
thrown.expectAssertionError(format("%nExpecting not blank but was:<null>"));
diff --git a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_AbstractNodeTester.java b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_AbstractNodeTester.java
index 3a8ac80..df02659 100644
--- a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_AbstractNodeTester.java
+++ b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_AbstractNodeTester.java
@@ -176,7 +176,7 @@ public void testTextNode() {
}
// never called as NodeTest directly jumps to the document element
- public void testDocumentType() throws Exception {
+ public void no_testDocumentType() throws Exception {
AbstractNodeTester t = new AbstractNodeTester() { };
DocumentType n = XMLUnit
.buildControlDocument("<!DOCTYPE Book PUBLIC \"XMLUNIT/TEST/PUB1\" \"../test-resources/Book.dtd\">"
diff --git a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_DifferenceEngine.java b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_DifferenceEngine.java
index 344d66c..35220b8 100644
--- a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_DifferenceEngine.java
+++ b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_DifferenceEngine.java
@@ -1020,7 +1020,7 @@ public void testIgnoresDifferencesBetweenDocAndRootElement()
listener.different);
}
- public void testDoctypeDifferences() throws Exception {
+ public void no_testDoctypeDifferences() throws Exception {
String control = "<?xml version = \"1.0\" encoding = \"UTF-8\"?>"
+ "<!DOCTYPE Book PUBLIC \"XMLUNIT/TEST/PUB1\" \"../test-resources/Book.dtd\">"
+ "<Book/>";
diff --git a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_NewDifferenceEngine.java b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_NewDifferenceEngine.java
index 0e23767..526be89 100644
--- a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_NewDifferenceEngine.java
+++ b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_NewDifferenceEngine.java
@@ -567,7 +567,7 @@ public void testIgnoresDifferencesBetweenDocAndRootElement()
listener.different);
}
- public void testDoctypeDifferences() throws Exception {
+ public void no_testDoctypeDifferences() throws Exception {
String control = "<?xml version = \"1.0\" encoding = \"UTF-8\"?>"
+ "<!DOCTYPE Book PUBLIC \"XMLUNIT/TEST/PUB1\" \"../test-resources/Book.dtd\">"
+ "<Book/>";
diff --git a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_Validator.java b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_Validator.java
index ad63592..cfcc5e2 100644
--- a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_Validator.java
+++ b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_Validator.java
@@ -57,7 +57,7 @@ public class test_Validator extends XMLTestCase {
private Validator validator;
private File tempDTDFile;
- public void testXSchema() throws Exception{
+ public void no_testXSchema() throws Exception{
File xsdFile = new File(test_Constants.TEST_RESOURCE_DIR + "Book.xsd");
assertTrue("xsdFile " + xsdFile.getAbsolutePath() + " exists",
xsdFile.exists());
diff --git a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java
index 6f26927..bf9a153 100644
--- a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java
+++ b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java
@@ -13,6 +13,7 @@
*/
package org.xmlunit.matchers;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
@@ -79,6 +80,7 @@ public void shouldThrowOnBrokenInstance() {
}
@Test
+ @Ignore
public void shouldSuccessfullyValidateInstanceWithoutExplicitSchemaSource() {
try {
Class.forName("java.nio.file.FileSystem");
--
2.35.1

View File

@ -1,7 +1,7 @@
From c81eb91d7b9aa9728dfc83d68a881b4e2a0fa8d2 Mon Sep 17 00:00:00 2001 From 8d7373f5feef927514339fe42919873836c0f710 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com> From: Marian Koncek <mkoncek@redhat.com>
Date: Thu, 29 Aug 2019 13:58:24 +0200 Date: Thu, 29 Aug 2019 13:58:24 +0200
Subject: [PATCH 2/4] Port to hamcrest 2.1 Subject: [PATCH 2/3] Port to hamcrest 2.1
--- ---
.../src/main/java/org/xmlunit/matchers/CompareMatcher.java | 3 --- .../src/main/java/org/xmlunit/matchers/CompareMatcher.java | 3 ---
@ -15,7 +15,7 @@ diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.
index 6452081..226399c 100644 index 6452081..226399c 100644
--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java --- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java
+++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java +++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java
@@ -33,7 +33,6 @@ import org.xmlunit.util.Predicate; @@ -33,7 +33,6 @@
import org.hamcrest.BaseMatcher; import org.hamcrest.BaseMatcher;
import org.hamcrest.Description; import org.hamcrest.Description;
@ -23,7 +23,7 @@ index 6452081..226399c 100644
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
@@ -112,7 +111,6 @@ public final class CompareMatcher extends BaseMatcher<Object> @@ -112,7 +111,6 @@ private CompareMatcher(Object control) {
* <p> * <p>
* As input all types are supported which are supported by {@link Input#from(Object)}. * As input all types are supported which are supported by {@link Input#from(Object)}.
*/ */
@ -31,7 +31,7 @@ index 6452081..226399c 100644
public static CompareMatcher isIdenticalTo(final Object control) { public static CompareMatcher isIdenticalTo(final Object control) {
return new CompareMatcher(control).checkForIdentical(); return new CompareMatcher(control).checkForIdentical();
} }
@@ -128,7 +126,6 @@ public final class CompareMatcher extends BaseMatcher<Object> @@ -128,7 +126,6 @@ public static CompareMatcher isIdenticalTo(final Object control) {
* <p> * <p>
* As input all types are supported which are supported by {@link Input#from(Object)}. * As input all types are supported which are supported by {@link Input#from(Object)}.
*/ */
@ -43,7 +43,7 @@ diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMa
index 6eb23e5..1e9b8b5 100644 index 6eb23e5..1e9b8b5 100644
--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java --- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java
+++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java +++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java
@@ -16,7 +16,6 @@ package org.xmlunit.matchers; @@ -16,7 +16,6 @@
import org.hamcrest.BaseMatcher; import org.hamcrest.BaseMatcher;
import org.hamcrest.Description; import org.hamcrest.Description;
@ -51,7 +51,7 @@ index 6eb23e5..1e9b8b5 100644
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import org.xmlunit.builder.Input; import org.xmlunit.builder.Input;
@@ -93,7 +92,6 @@ public class EvaluateXPathMatcher extends BaseMatcher<Object> { @@ -93,7 +92,6 @@ public EvaluateXPathMatcher(String xPath, Matcher<String> valueMatcher) {
* @param valueMatcher matcher for the value at the specified xpath * @param valueMatcher matcher for the value at the specified xpath
* @return the xpath matcher * @return the xpath matcher
*/ */
@ -63,7 +63,7 @@ diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher
index 08325cd..6fbf0ac 100644 index 08325cd..6fbf0ac 100644
--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java --- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java
+++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java +++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java
@@ -16,7 +16,6 @@ package org.xmlunit.matchers; @@ -16,7 +16,6 @@
import org.hamcrest.BaseMatcher; import org.hamcrest.BaseMatcher;
import org.hamcrest.Description; import org.hamcrest.Description;
@ -71,7 +71,7 @@ index 08325cd..6fbf0ac 100644
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import org.xmlunit.builder.Input; import org.xmlunit.builder.Input;
@@ -135,7 +134,6 @@ public class HasXPathMatcher extends BaseMatcher<Object> { @@ -135,7 +134,6 @@ public void describeMismatch(Object item, Description mismatchDescription) {
* @param xPath the target xpath * @param xPath the target xpath
* @return the xpath matcher * @return the xpath matcher
*/ */
@ -91,7 +91,7 @@ index b9002a1..7cd6843 100644
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher; import org.hamcrest.TypeSafeMatcher;
@@ -128,7 +127,6 @@ public abstract class TypeMatcher<T> extends TypeSafeMatcher<String> { @@ -128,7 +127,6 @@ private T nullSafeConvert(String item) {
* @param valueMatcher valueMatcher for the converted value * @param valueMatcher valueMatcher for the converted value
* @return the BigDecimal matcher * @return the BigDecimal matcher
*/ */
@ -99,7 +99,7 @@ index b9002a1..7cd6843 100644
public static TypeMatcher<BigDecimal> asBigDecimal(Matcher<? extends BigDecimal> valueMatcher) { public static TypeMatcher<BigDecimal> asBigDecimal(Matcher<? extends BigDecimal> valueMatcher) {
return new BigDecimalTypeMatcher(valueMatcher); return new BigDecimalTypeMatcher(valueMatcher);
} }
@@ -146,7 +144,6 @@ public abstract class TypeMatcher<T> extends TypeSafeMatcher<String> { @@ -146,7 +144,6 @@ public static TypeMatcher<BigDecimal> asBigDecimal(Matcher<? extends BigDecimal>
* @param valueMatcher valueMatcher for the converted value * @param valueMatcher valueMatcher for the converted value
* @return the Double matcher * @return the Double matcher
*/ */
@ -107,7 +107,7 @@ index b9002a1..7cd6843 100644
public static TypeMatcher<Double> asDouble(Matcher<? extends Double> valueMatcher) { public static TypeMatcher<Double> asDouble(Matcher<? extends Double> valueMatcher) {
return new DoubleTypeMatcher(valueMatcher); return new DoubleTypeMatcher(valueMatcher);
} }
@@ -164,7 +161,6 @@ public abstract class TypeMatcher<T> extends TypeSafeMatcher<String> { @@ -164,7 +161,6 @@ public static TypeMatcher<Double> asDouble(Matcher<? extends Double> valueMatche
* @param valueMatcher valueMatcher for the converted value * @param valueMatcher valueMatcher for the converted value
* @return the Integer matcher * @return the Integer matcher
*/ */
@ -115,7 +115,7 @@ index b9002a1..7cd6843 100644
public static TypeMatcher<Integer> asInt(Matcher<? extends Integer> valueMatcher) { public static TypeMatcher<Integer> asInt(Matcher<? extends Integer> valueMatcher) {
return new IntegerTypeMatcher(valueMatcher); return new IntegerTypeMatcher(valueMatcher);
} }
@@ -182,7 +178,6 @@ public abstract class TypeMatcher<T> extends TypeSafeMatcher<String> { @@ -182,7 +178,6 @@ public static TypeMatcher<Integer> asInt(Matcher<? extends Integer> valueMatcher
* @param valueMatcher valueMatcher for the converted value * @param valueMatcher valueMatcher for the converted value
* @return the Boolean matcher * @return the Boolean matcher
*/ */
@ -127,7 +127,7 @@ diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatch
index 3126349..51f58ec 100644 index 3126349..51f58ec 100644
--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java --- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java
+++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java +++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java
@@ -27,7 +27,6 @@ import org.xmlunit.validation.ValidationProblem; @@ -27,7 +27,6 @@
import org.xmlunit.validation.ValidationResult; import org.xmlunit.validation.ValidationResult;
import org.hamcrest.BaseMatcher; import org.hamcrest.BaseMatcher;
import org.hamcrest.Description; import org.hamcrest.Description;
@ -135,7 +135,7 @@ index 3126349..51f58ec 100644
import javax.xml.transform.Source; import javax.xml.transform.Source;
import javax.xml.validation.Schema; import javax.xml.validation.Schema;
@@ -121,7 +120,6 @@ public class ValidationMatcher extends BaseMatcher { @@ -121,7 +120,6 @@ public void describeMismatch(final Object item, final Description mismatchDescri
} }
} }
@ -143,7 +143,7 @@ index 3126349..51f58ec 100644
public static ValidationMatcher valid(final Object schemaSource) { public static ValidationMatcher valid(final Object schemaSource) {
return new ValidationMatcher(schemaSource); return new ValidationMatcher(schemaSource);
} }
@@ -129,7 +127,6 @@ public class ValidationMatcher extends BaseMatcher { @@ -129,7 +127,6 @@ public static ValidationMatcher valid(final Object schemaSource) {
/** /**
* @since XMLUnit 2.3.0 * @since XMLUnit 2.3.0
*/ */
@ -152,5 +152,5 @@ index 3126349..51f58ec 100644
return new ValidationMatcher(schema); return new ValidationMatcher(schema);
} }
-- --
2.21.0 2.35.1

View File

@ -1,7 +1,7 @@
From 9866f331db726db0ac6af64649c308b01b34ea56 Mon Sep 17 00:00:00 2001 From 4b30dd33332f79c71697c8a9bdbf39d74fb06c4a Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com> From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Tue, 5 Nov 2019 12:14:08 +0100 Date: Tue, 5 Nov 2019 12:14:08 +0100
Subject: [PATCH 4/4] Drop support for JAXB Subject: [PATCH 3/3] Drop support for JAXB
--- ---
xmlunit-core/src/main/java/org/xmlunit/builder/Input.java | 4 ++-- xmlunit-core/src/main/java/org/xmlunit/builder/Input.java | 4 ++--
@ -9,10 +9,10 @@ Subject: [PATCH 4/4] Drop support for JAXB
2 files changed, 2 insertions(+), 9 deletions(-) 2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java b/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java diff --git a/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java b/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java
index 5321ff7..2b13cac 100644 index 27d9c5a..81165cc 100644
--- a/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java --- a/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java
+++ b/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java +++ b/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java
@@ -150,8 +150,8 @@ public class Input { @@ -153,8 +153,8 @@ public static Builder from(Object object) {
/** /**
* Build a Source from a Jaxb-Object. * Build a Source from a Jaxb-Object.
*/ */
@ -24,10 +24,10 @@ index 5321ff7..2b13cac 100644
/** /**
diff --git a/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java b/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java diff --git a/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java b/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java
index 83ff38a..fac270d 100644 index e767f38..98e3fe7 100644
--- a/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java --- a/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java
+++ b/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java +++ b/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java
@@ -31,7 +31,6 @@ import org.w3c.dom.Document; @@ -31,7 +31,6 @@
import org.xmlunit.NullNode; import org.xmlunit.NullNode;
import org.xmlunit.TestResources; import org.xmlunit.TestResources;
import org.xmlunit.XMLUnitException; import org.xmlunit.XMLUnitException;
@ -35,7 +35,7 @@ index 83ff38a..fac270d 100644
import org.xmlunit.util.Convert; import org.xmlunit.util.Convert;
import org.xmlunit.xpath.JAXPXPathEngine; import org.xmlunit.xpath.JAXPXPathEngine;
@@ -148,10 +147,6 @@ public class InputTest { @@ -132,10 +131,6 @@ private static Document parse(Source s) throws Exception {
allIsWellFor(s, "furry"); allIsWellFor(s, "furry");
} }
@ -46,15 +46,15 @@ index 83ff38a..fac270d 100644
@Test public void shouldParseUnknownToSource() throws Exception { @Test public void shouldParseUnknownToSource() throws Exception {
// from Source // from Source
allIsWellFor(Input.from(Input.fromByteArray(readTestFile()).build()).build()); allIsWellFor(Input.from(Input.fromByteArray(readTestFile()).build()).build());
@@ -169,8 +164,6 @@ public class InputTest { @@ -153,8 +148,6 @@ private static Document parse(Source s) throws Exception {
allIsWellFor(Input.from(new URI("file:" + TestResources.ANIMAL_FILE)).build()); allIsWellFor(Input.from(new URI("file:" + TestResources.ANIMAL_FILE)).build());
// from URL // from URL
allIsWellFor(Input.from(new URL("file:" + TestResources.ANIMAL_FILE)).build()); allIsWellFor(Input.from(new URL("file:" + TestResources.ANIMAL_FILE)).build());
- // from Jaxb-Object - // from Jaxb-Object
- allIsWellFor(Input.from(new ComplexNode()).build(), "complexNode"); - allIsWellFor(Input.from(new ComplexNode()).build(), "complexNode");
// from InputStream // from InputStream
FileInputStream is = null; try (FileInputStream is = new FileInputStream(TestResources.ANIMAL_FILE)) {
try { allIsWellFor(Input.from(is).build());
-- --
2.21.0 2.35.1

View File

@ -1,146 +0,0 @@
From 73abcb06636217e52a9d56b4dc3c69bd37141d44 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Mon, 4 Mar 2019 14:52:59 +0100
Subject: [PATCH 1/4] Disable tests requiring network access
---
.../assertj/XmlAssertNodesByXPathTest.java | 8 ---
.../assertj/XmlAssertValidationTest.java | 51 -------------------
.../assertj/XmlAssertValueByXPathTest.java | 8 ---
.../matchers/ValidationMatcherTest.java | 13 -----
4 files changed, 80 deletions(-)
diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java
index 6499f67..71267c3 100644
--- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java
+++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java
@@ -42,14 +42,6 @@ public class XmlAssertNodesByXPathTest {
assertThat(null).nodesByXPath("//foo");
}
- @Test
- public void testNodesByXPath_withNull_shouldFailed() {
-
- thrown.expectAssertionError(format("%nExpecting not blank but was:<null>"));
-
- assertThat("<a><b></b><c/></a>").nodesByXPath(null);
- }
-
@Test
public void testNodesByXPath_withWhitespacesOnly_shouldFailed() {
diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java
index cfa46ce..8031ede 100644
--- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java
+++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java
@@ -82,47 +82,6 @@ public class XmlAssertValidationTest {
assertThat(xml).isValidAgainst(xsd);
}
- @Test
- public void testIsValidAgainst_withEmptySourcesArray_shouldPass() {
-
- StreamSource xml = new StreamSource(new File("../test-resources/BookXsdGenerated.xml"));
-
- assertThat(xml).isValidAgainst();
- assertThat(xml).isValidAgainst(new Object[0]);
- }
-
- @Test
- public void testIsValidAgainst_withBrokenXmlAndEmptySourcesArray_shouldFailed() {
-
- thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" +
- " message=cvc-complex-type.2.4.b: The content of element 'Book' is not complete." +
- " One of '{\"https://www.xmlunit.org/publishing\":Publisher}' is expected.");
-
- StreamSource xml = new StreamSource(new File("../test-resources/invalidBook.xml"));
-
- assertThat(xml).isValidAgainst();
- }
-
- @Test
- public void testIsValid_shouldPass() {
-
- StreamSource xml = new StreamSource(new File("../test-resources/BookXsdGenerated.xml"));
-
- assertThat(xml).isValid();
- }
-
- @Test
- public void testIsValid_withBrokenXml_shouldPass() {
-
- thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" +
- " message=cvc-complex-type.2.4.b: The content of element 'Book' is not complete." +
- " One of '{\"https://www.xmlunit.org/publishing\":Publisher}' is expected.");
-
- StreamSource xml = new StreamSource(new File("../test-resources/invalidBook.xml"));
-
- assertThat(xml).isValid();
- }
-
@Test
public void testIsInvalid_withBrokenXml_shouldPass() {
@@ -131,16 +90,6 @@ public class XmlAssertValidationTest {
assertThat(xml).isInvalid();
}
- @Test
- public void testIsInvalid_shouldField() {
-
- thrown.expectAssertionErrorPattern("^\\nExpecting:\\n <.*\\.\\.\\/test-resources\\/BookXsdGenerated.xml>\\nto be invalid");
-
- StreamSource xml = new StreamSource(new File("../test-resources/BookXsdGenerated.xml"));
-
- assertThat(xml).isInvalid();
- }
-
@Test
public void testIsValidAgainst_withNullSchemaSources_shouldFailed() {
diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java
index 4aaf96b..d3a9cdd 100644
--- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java
+++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java
@@ -25,14 +25,6 @@ public class XmlAssertValueByXPathTest {
@Rule
public ExpectedException thrown = none();
- @Test
- public void testValueByXPath_withNull_shouldFailed() {
-
- thrown.expectAssertionError(format("%nExpecting not blank but was:<null>"));
-
- assertThat("<a><b></b><c/></a>").valueByXPath(null);
- }
-
@Test
public void testValueByXPath_withWhitespacesOnly_shouldFailed() {
diff --git a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java
index 793e26a..eb4e9fa 100644
--- a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java
+++ b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java
@@ -76,19 +76,6 @@ public class ValidationMatcherTest {
is(valid(new StreamSource(new File("../test-resources/Book.xsd")))));
}
- @Test
- public void shouldSuccessfullyValidateInstanceWithoutExplicitSchemaSource() {
- try {
- Class.forName("java.nio.file.FileSystem");
- } catch (Throwable t) {
- assumeTrue("Skipping on Java6 as it doesn't like xmlunit.org's certificate",
- false);
- }
- assertThat(new StreamSource(new File("../test-resources/BookXsdGenerated.xml")),
- is(new ValidationMatcher()));
-
- }
-
@Test(expected = AssertionError.class)
public void shouldThrowOnBrokenInstanceWithoutExplicitSchemaSource() {
assertThat(new StreamSource(new File("../test-resources/invalidBook.xml")),
--
2.21.0

View File

@ -1,25 +0,0 @@
From 2aa7002c9ff0d6226ff75048dd3cee15a180dd99 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Wed, 16 Oct 2019 09:32:19 +0200
Subject: [PATCH 3/4] Fix test failure
---
.../src/test/java/org/xmlunit/assertj/ValueAssertTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java
index d1e3545..5078360 100644
--- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java
+++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java
@@ -224,7 +224,7 @@ public class ValueAssertTest {
@Test
public void testIsEqualTo_withAttributeValueExpression_shouldFailed() {
- thrown.expectAssertionError("expected:<\"[something]\"> but was:<\"[abc]\">");
+ thrown.expectAssertionError("Expecting:\n <\"abc\">\nto be equal to:\n <\"something\">\nbut was not.");
String xml = "<a><b attr=\"abc\"></b></a>";
--
2.21.0

20
generate-tarball.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
set -e
name=xmlunit
version="$(sed -n 's/Version:\s*//p' *.spec)"
# RETRIEVE
wget "https://github.com/xmlunit/xmlunit/releases/download/v${version}/${name}-${version}-src.tar.gz" -O "${name}-${version}.orig.tar.gz"
rm -rf tarball-tmp
mkdir tarball-tmp
pushd tarball-tmp
tar xf "../${name}-${version}.orig.tar.gz"
# CLEAN TARBALL
rm */GPATH */GRTAGS */GTAGS
tar -czf "../${name}-${version}.tar.gz" *
popd
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (xmlunit-2.8.2.tar.gz) = 345ef6b8072d2a27e880475d813c704636cf029cd8c43ea639828775fc8c5713ceed908f01b80f6decf6e36fbac7ddca41c09a1222aee23540305c9c25a75154

View File

@ -1,27 +1,36 @@
%bcond_with bootstrap
Name: xmlunit Name: xmlunit
Version: 2.6.3 Version: 2.8.2
Release: 2%{?dist} Release: 8%{?dist}
Summary: Provides classes to do asserts on xml Summary: Provides classes to do asserts on xml
# The whole package is ASL 2.0 except for xmlunit-legacy which is BSD # The whole package is ASL 2.0 except for xmlunit-legacy which is BSD
License: ASL 2.0 and BSD License: ASL 2.0 and BSD
Source0: https://github.com/xmlunit/xmlunit/releases/download/v%{version}/%{name}-%{version}-src.tar.gz
URL: https://www.xmlunit.org/ URL: https://www.xmlunit.org/
BuildArch: noarch
ExclusiveArch: %{java_arches} noarch
# ./generate-tarball.sh
Source0: %{name}-%{version}.tar.gz
# Remove bundled binaries which cannot be easily verified for licensing
Source1: generate-tarball.sh
Patch1: 0001-Disable-tests-requiring-network-access.patch Patch1: 0001-Disable-tests-requiring-network-access.patch
Patch2: 0002-Port-to-hamcrest-2.1.patch Patch2: 0002-Port-to-hamcrest-2.1.patch
Patch3: 0003-Fix-test-failure.patch Patch3: 0003-Drop-support-for-JAXB.patch
Patch4: 0004-Drop-support-for-JAXB.patch
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: maven-local BuildRequires: maven-local
BuildRequires: mvn(junit:junit) BuildRequires: mvn(junit:junit)
BuildRequires: mvn(net.bytebuddy:byte-buddy)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-shade-plugin)
BuildRequires: mvn(org.assertj:assertj-core) BuildRequires: mvn(org.assertj:assertj-core)
BuildRequires: mvn(org.hamcrest:hamcrest-core) BuildRequires: mvn(org.hamcrest:hamcrest-core)
BuildRequires: mvn(org.hamcrest:hamcrest-library) BuildRequires: mvn(org.hamcrest:hamcrest-library)
BuildRequires: mvn(org.mockito:mockito-core) BuildRequires: mvn(org.mockito:mockito-core)
%endif
BuildArch: noarch
%description %description
XMLUnit provides you with the tools to verify the XML you emit is the one you XMLUnit provides you with the tools to verify the XML you emit is the one you
@ -69,20 +78,25 @@ This package provides %{summary}.
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
# This test failure showed up after updating mockito to 3.X, but the error
# message clearly points to assertj-core
%patch3 -p1 %patch3 -p1
%patch4 -p1
# Tests compare the string constent of thrown exceptions
# and we use a different version of assertj
find xmlunit-assertj3/src/test -name '*.java' -exec sed -i 's/\(Expecting not blank but was:\)<\(.*\)>/\1 \2/' {} +
sed -i 's/\(expected:\)<\\"\[\(something\)\]\\"> but was:<\\"\[\(abc\)\]\\">/\1 \\"\2\\"\\nbut was : \\"\3\\"/' xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/ValueAssertTest.java
%pom_disable_module xmlunit-assertj
%pom_remove_plugin org.codehaus.mojo:buildnumber-maven-plugin %pom_remove_plugin org.codehaus.mojo:buildnumber-maven-plugin
%pom_remove_plugin :maven-assembly-plugin %pom_remove_plugin :maven-assembly-plugin
%pom_remove_plugin -r :maven-shade-plugin
%mvn_alias "org.xmlunit:xmlunit-legacy" "xmlunit:xmlunit" %mvn_alias org.xmlunit:xmlunit-legacy xmlunit:xmlunit
%mvn_alias org.xmlunit:xmlunit-assertj3 org.xmlunit:xmlunit-assertj
# JAXB and JAF are not available in JDK11 # JAXB and JAF are not available in JDK11
%pom_remove_dep javax.activation:* xmlunit-core %pom_remove_dep org.glassfish.jaxb: xmlunit-core
%pom_remove_dep javax.xml.bind:* xmlunit-core %pom_remove_dep jakarta.xml.bind: xmlunit-core
%pom_remove_dep com.sun.xml.bind:* xmlunit-core
rm -rf xmlunit-core/src/{main,test}/java/org/xmlunit/builder/{jaxb/,JaxbBuilder.java,JaxbBuilderTest.java} rm -rf xmlunit-core/src/{main,test}/java/org/xmlunit/builder/{jaxb/,JaxbBuilder.java,JaxbBuilderTest.java}
%build %build
@ -96,16 +110,76 @@ rm -rf xmlunit-core/src/{main,test}/java/org/xmlunit/builder/{jaxb/,JaxbBuilder.
%license LICENSE %license LICENSE
%files javadoc -f .mfiles-javadoc %files javadoc -f .mfiles-javadoc
%files assertj -f .mfiles-xmlunit-assertj %files assertj -f .mfiles-xmlunit-assertj3
%files core -f .mfiles-xmlunit-core %files core -f .mfiles-xmlunit-core
%files legacy -f .mfiles-xmlunit-legacy %files legacy -f .mfiles-xmlunit-legacy
%files matchers -f .mfiles-xmlunit-matchers %files matchers -f .mfiles-xmlunit-matchers
%files placeholders -f .mfiles-xmlunit-placeholders %files placeholders -f .mfiles-xmlunit-placeholders
%changelog %changelog
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Apr 22 2022 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.8.2-7
- Disable more tests that require network access
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 2.8.2-6
- Rebuilt for java-17-openjdk as system jdk
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 18 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.8.2-3
- Clean tarball from content with questionable licensing
- Resolves: rhbz#1973721
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.8.2-2
- Bootstrap build
- Non-bootstrap build
* Thu Feb 04 2021 Merlin Mathesius <mmathesi@redhat.com> - 0:2.7.0-7
- Update previous patch to use improved version that was merged upstream
* Fri Jan 29 2021 Merlin Mathesius <mmathesi@redhat.com> - 0:2.7.0-6
- Fix FTBFS by patching ValueAssertTest to adjust for changed format of
mismatched string exception
* Thu Jan 28 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.7.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jan 26 2021 Marian Koncek <mkoncek@redhat.com> - 2.8.2-1
- Update to upstream version 2.8.2
* Wed Jul 29 2020 Marian Koncek <mkoncek@redhat.com> - 2.7.0-1
- Update to upstream version 2.7.0
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.7.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 20 2020 Mat Booth <mat.booth@redhat.com> - 0:2.7.0-3
- Allow building against JDK 11
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 0:2.7.0-2
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
* Wed May 13 2020 Dr. Tilmann Bubeck <bubeck@fedoraproject.org> - 0:2.7.0-1
- Update to version 2.7.0.
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.6.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.6.3-2 * Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.6.3-2
- Mass rebuild for javapackages-tools 201902 - Mass rebuild for javapackages-tools 201902
* Mon Jul 29 2019 Fabio Valentini <decathorpe@gmail.com> - 0:2.6.3-1
- Update to version 2.6.3.
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.6-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Jun 26 2019 Marian Koncek <mkoncek@redhat.com> - 2.6.3-1 * Wed Jun 26 2019 Marian Koncek <mkoncek@redhat.com> - 2.6.3-1
- Update to upstream version 2.6.3 - Update to upstream version 2.6.3