From 818f3ead642a0f0d4de3a5985386b056e51494ac Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Mon, 6 May 2024 09:57:16 +0300 Subject: [PATCH] #247 extra test --- src/test/java/com/jcabi/xml/XMLDocumentTest.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/test/java/com/jcabi/xml/XMLDocumentTest.java b/src/test/java/com/jcabi/xml/XMLDocumentTest.java index 2d7c3b7..4ef6d96 100644 --- a/src/test/java/com/jcabi/xml/XMLDocumentTest.java +++ b/src/test/java/com/jcabi/xml/XMLDocumentTest.java @@ -428,4 +428,19 @@ void extractsNodesFromPom() throws Exception { Matchers.hasSize(2) ); } + + @Test + void stripsUnnecessaryWhiteSpacesWhileParsing() { + MatcherAssert.assertThat( + new XMLDocument( + "\n hello\n".getBytes() + ), + Matchers.equalTo( + new XMLDocument( + " \n hello \n ".getBytes() + ) + ) + ); + } + }