diff --git a/spring-core/src/test/java/org/springframework/util/xml/XmlValidationModeDetectorTests.java b/spring-core/src/test/java/org/springframework/util/xml/XmlValidationModeDetectorTests.java
index dcdcf3e49d0..15a97691c1e 100644
--- a/spring-core/src/test/java/org/springframework/util/xml/XmlValidationModeDetectorTests.java
+++ b/spring-core/src/test/java/org/springframework/util/xml/XmlValidationModeDetectorTests.java
@@ -44,7 +44,8 @@ class XmlValidationModeDetectorTests {
"dtdWithTrailingComment.xml",
"dtdWithTrailingCommentAcrossMultipleLines.xml",
"dtdWithCommentOnNextLine.xml",
- "dtdWithMultipleComments.xml"
+ "dtdWithMultipleComments.xml",
+ "dtdWithDoctypeInMultiLineCommentBody.xml"
})
void dtdDetection(String fileName) throws Exception {
assertValidationMode(fileName, VALIDATION_DTD);
@@ -56,7 +57,8 @@ class XmlValidationModeDetectorTests {
"xsdWithMultipleComments.xml",
"xsdWithDoctypeInComment.xml",
"xsdWithDoctypeInOpenCommentWithAdditionalCommentOnSameLine.xml",
- "xsdWithDoctypeInMultiLineCommentBody.xml"
+ "xsdWithDoctypeInMultiLineCommentBody.xml",
+ "xsdWithMultipleDoctypesInMultiLineCommentBody.xml"
})
void xsdDetection(String fileName) throws Exception {
assertValidationMode(fileName, VALIDATION_XSD);
diff --git a/spring-core/src/test/resources/org/springframework/util/xml/dtdWithDoctypeInMultiLineCommentBody.xml b/spring-core/src/test/resources/org/springframework/util/xml/dtdWithDoctypeInMultiLineCommentBody.xml
new file mode 100644
index 00000000000..9256a3103b0
--- /dev/null
+++ b/spring-core/src/test/resources/org/springframework/util/xml/dtdWithDoctypeInMultiLineCommentBody.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
diff --git a/spring-core/src/test/resources/org/springframework/util/xml/xsdWithMultipleDoctypesInMultiLineCommentBody.xml b/spring-core/src/test/resources/org/springframework/util/xml/xsdWithMultipleDoctypesInMultiLineCommentBody.xml
new file mode 100644
index 00000000000..87a39cdaaf8
--- /dev/null
+++ b/spring-core/src/test/resources/org/springframework/util/xml/xsdWithMultipleDoctypesInMultiLineCommentBody.xml
@@ -0,0 +1,12 @@
+
+
+
+
+