tdf#66305: xhtml: Add unittest
Change-Id: Iea9d1c5972534eb7fef17464fda88f559e9a75f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92365
Tested-by: Jenkins
Reviewed-by: Xisco FaulĂ <xiscofauli@libreoffice.org>
diff --git a/sw/qa/extras/htmlexport/xhtmlexport.cxx b/sw/qa/extras/htmlexport/xhtmlexport.cxx
index 714c982..1fdb1fd 100644
--- a/sw/qa/extras/htmlexport/xhtmlexport.cxx
+++ b/sw/qa/extras/htmlexport/xhtmlexport.cxx
@@ -79,6 +79,18 @@ DECLARE_HTMLEXPORT_TEST(testTdf107696, "tdf107696.odt")
!= -1);
}
DECLARE_HTMLEXPORT_TEST(testTdf66305, "tdf66305.odt")
{
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
CPPUNIT_ASSERT(pStream);
sal_uInt64 nLength = pStream->TellEnd();
OString aStream(read_uInt8s_ToOString(*pStream, nLength));
CPPUNIT_ASSERT(
aStream.indexOf("<p class=\"P6\"><a href=\"#__RefHeading__82004_486970805\" "
"class=\"Internet_20_link\">Introduction</a></p><p class=\"P7\"> </p>")
!= -1);
}
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/odfexport/data/tdf66305.odt b/sw/qa/extras/odfexport/data/tdf66305.odt
new file mode 100644
index 0000000..4a310a83
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/tdf66305.odt
Binary files differ