diff options
| author | luccioman <luccioman@users.noreply.github.com> | 2017-08-14 14:47:01 +0200 |
|---|---|---|
| committer | luccioman <luccioman@users.noreply.github.com> | 2017-08-14 14:47:01 +0200 |
| commit | acab6a6defb3307d27fb97004f99e0be4be8f55f (patch) | |
| tree | bc34d3488df272b302e9934eebc14dc9bffc7e37 /test/java | |
| parent | f38fb7f02c9c93e73a6a3326b98074bc1624f9f0 (diff) | |
Also handle text content when parsing XML within limits.
Diffstat (limited to 'test/java')
| -rw-r--r-- | test/java/net/yacy/document/parser/GenericXMLParserTest.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/java/net/yacy/document/parser/GenericXMLParserTest.java b/test/java/net/yacy/document/parser/GenericXMLParserTest.java index d4d6affe4..18b6cb438 100644 --- a/test/java/net/yacy/document/parser/GenericXMLParserTest.java +++ b/test/java/net/yacy/document/parser/GenericXMLParserTest.java @@ -390,6 +390,8 @@ public class GenericXMLParserTest { assertEquals(1, documents.length); assertFalse(documents[0].isPartiallyParsed()); + assertTrue(documents[0].getTextString().contains("And this is a relative link")); + Collection<AnchorURL> detectedAnchors = documents[0].getAnchors(); assertNotNull(detectedAnchors); assertEquals(5, detectedAnchors.size()); @@ -410,6 +412,9 @@ public class GenericXMLParserTest { assertEquals(1, documents.length); assertTrue(documents[0].isPartiallyParsed()); + assertTrue(documents[0].getTextString().contains("Home page")); + assertFalse(documents[0].getTextString().contains("And this is a relative link")); + Collection<AnchorURL> detectedAnchors = documents[0].getAnchors(); assertNotNull(detectedAnchors); assertEquals(2, detectedAnchors.size()); @@ -447,6 +452,9 @@ public class GenericXMLParserTest { assertEquals(1, documents.length); assertTrue(documents[0].isPartiallyParsed()); + assertTrue(documents[0].getTextString().contains("and this is a mention to a relative URL")); + assertFalse(documents[0].getTextString().contains("And this is a relative link to another")); + Collection<AnchorURL> detectedAnchors = documents[0].getAnchors(); assertNotNull(detectedAnchors); assertEquals(3, detectedAnchors.size()); |
