diff options
Diffstat (limited to 'writerperfect/qa/unit/EPUBExportTest.cxx')
-rw-r--r-- | writerperfect/qa/unit/EPUBExportTest.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx b/writerperfect/qa/unit/EPUBExportTest.cxx index f52667a9b6ce..5a1c21c0e48f 100644 --- a/writerperfect/qa/unit/EPUBExportTest.cxx +++ b/writerperfect/qa/unit/EPUBExportTest.cxx @@ -85,6 +85,7 @@ public: void testTableCellWidth(); void testTableRowHeight(); void testLink(); + void testLinkInvalid(); void testLinkCharFormat(); void testLinkNamedCharFormat(); void testTableWidth(); @@ -129,6 +130,7 @@ public: CPPUNIT_TEST(testTableCellWidth); CPPUNIT_TEST(testTableRowHeight); CPPUNIT_TEST(testLink); + CPPUNIT_TEST(testLinkInvalid); CPPUNIT_TEST(testLinkCharFormat); CPPUNIT_TEST(testLinkNamedCharFormat); CPPUNIT_TEST(testTableWidth); @@ -662,6 +664,15 @@ void EPUBExportTest::testLink() assertXPath(mpXmlDoc, "//xhtml:p/xhtml:a", "href", "https://libreoffice.org/"); } +void EPUBExportTest::testLinkInvalid() +{ + createDoc("link-invalid.odt", {}); + + mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml"); + // This was 1, invalid relative link was not filtered out. + assertXPath(mpXmlDoc, "//xhtml:p/xhtml:a", 0); +} + void EPUBExportTest::testLinkCharFormat() { createDoc("link-charformat.fodt", {}); |