Kaydet (Commit) d81e6184 authored tarafından Miklos Vajna's avatar Miklos Vajna

EPUB export: test link handling

Fails without commit 9480ff6a (EPUB
export: implement link support, 2017-08-17).

Change-Id: Icee6ac04ff77d0e9ff66ca1f925d6973b4b342a2
Reviewed-on: https://gerrit.libreoffice.org/42786Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst c0c311a1
......@@ -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);
}
......
<?xml version="1.0" encoding="UTF-8"?>
<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
<office:body>
<office:text>
<text:p>Before <text:a xlink:type="simple" xlink:href="https://libreoffice.org/">https://libreoffice.org/</text:a> after.</text:p>
</office:text>
</office:body>
</office:document>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment