From d81e6184f691cf49abdbf3b3714c507dcca3a50c Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 26 Sep 2017 11:07:13 +0200 Subject: EPUB export: test link handling Fails without commit 9480ff6a2b6057410940ff5c40828d5746898a0e (EPUB export: implement link support, 2017-08-17). Change-Id: Icee6ac04ff77d0e9ff66ca1f925d6973b4b342a2 Reviewed-on: https://gerrit.libreoffice.org/42786 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- writerperfect/qa/unit/EPUBExportTest.cxx | 11 +++++++++++ writerperfect/qa/unit/data/writer/epubexport/link.fodt | 8 ++++++++ 2 files changed, 19 insertions(+) create mode 100644 writerperfect/qa/unit/data/writer/epubexport/link.fodt (limited to 'writerperfect') diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx b/writerperfect/qa/unit/EPUBExportTest.cxx index 5b3f4b9a0c27..d79a196c7863 100644 --- a/writerperfect/qa/unit/EPUBExportTest.cxx +++ b/writerperfect/qa/unit/EPUBExportTest.cxx @@ -71,6 +71,7 @@ public: void testList(); void testImage(); void testTable(); + void testLink(); CPPUNIT_TEST_SUITE(EPUBExportTest); CPPUNIT_TEST(testOutlineLevel); @@ -91,6 +92,7 @@ public: CPPUNIT_TEST(testList); CPPUNIT_TEST(testImage); CPPUNIT_TEST(testTable); + CPPUNIT_TEST(testLink); CPPUNIT_TEST_SUITE_END(); }; @@ -453,6 +455,15 @@ void EPUBExportTest::testTable() assertXPath(mpXmlDoc, "//xhtml:table/xhtml:tbody/xhtml:tr/xhtml:td", 4); } +void EPUBExportTest::testLink() +{ + createDoc("link.fodt", {}); + + mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml"); + assertXPathContent(mpXmlDoc, "//xhtml:p/xhtml:a", "https://libreoffice.org/"); + assertXPath(mpXmlDoc, "//xhtml:p/xhtml:a", "href", "https://libreoffice.org/"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(EPUBExportTest); } diff --git a/writerperfect/qa/unit/data/writer/epubexport/link.fodt b/writerperfect/qa/unit/data/writer/epubexport/link.fodt new file mode 100644 index 000000000000..9a2efcc0b7a8 --- /dev/null +++ b/writerperfect/qa/unit/data/writer/epubexport/link.fodt @@ -0,0 +1,8 @@ + + + + + Before https://libreoffice.org/ after. + + + -- cgit