summaryrefslogtreecommitdiff
path: root/writerperfect/qa/unit/EPUBExportTest.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-11-30 16:31:18 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-12-01 09:16:23 +0100
commit8f0f8f80c1712fdc2ebb178cb88c5bd43db50fb7 (patch)
treebb9635429a605986b394110624cb15051426a58e /writerperfect/qa/unit/EPUBExportTest.cxx
parent035fad219e1729c9e4fe8a54fd85f23c065de616 (diff)
EPUB export: don't loose images with links
And actually handle the link around the image. Change-Id: Ic9b7b9497becf677dbf550c67074c5c588ef8922
Diffstat (limited to 'writerperfect/qa/unit/EPUBExportTest.cxx')
-rw-r--r--writerperfect/qa/unit/EPUBExportTest.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx b/writerperfect/qa/unit/EPUBExportTest.cxx
index 1760caa05096..d04c2eeeaaa3 100644
--- a/writerperfect/qa/unit/EPUBExportTest.cxx
+++ b/writerperfect/qa/unit/EPUBExportTest.cxx
@@ -87,6 +87,7 @@ public:
void testTableWidth();
void testTextBox();
void testFontEmbedding();
+ void testImageLink();
CPPUNIT_TEST_SUITE(EPUBExportTest);
CPPUNIT_TEST(testOutlineLevel);
@@ -122,6 +123,7 @@ public:
CPPUNIT_TEST(testTableWidth);
CPPUNIT_TEST(testTextBox);
CPPUNIT_TEST(testFontEmbedding);
+ CPPUNIT_TEST(testImageLink);
CPPUNIT_TEST_SUITE_END();
};
@@ -679,6 +681,15 @@ void EPUBExportTest::testFontEmbedding()
#endif
}
+void EPUBExportTest::testImageLink()
+{
+ createDoc("image-link.fodt", {});
+
+ mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
+ // This failed, image was missing.
+ assertXPath(mpXmlDoc, "//xhtml:p/xhtml:a/xhtml:img", 1);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(EPUBExportTest);
}