[Libreoffice-commits] core.git: sw/qa

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 16 08:19:32 UTC 2020


 sw/qa/extras/htmlexport/xhtmlexport.cxx   |   12 ++++++++++++
 sw/qa/extras/odfexport/data/tdf131812.odt |binary
 2 files changed, 12 insertions(+)

New commits:
commit f57962fe9a282a3acd0c824e283316b38fe7a130
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed Apr 15 19:41:01 2020 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Thu Apr 16 10:19:06 2020 +0200

    tdf#131812: xhtml: Add unittest
    
    Change-Id: I70d0d70c62b92ff65aadebc0952a922ce21b56d2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92315
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sw/qa/extras/htmlexport/xhtmlexport.cxx b/sw/qa/extras/htmlexport/xhtmlexport.cxx
index d9384e318728..bce7a1ea16c4 100644
--- a/sw/qa/extras/htmlexport/xhtmlexport.cxx
+++ b/sw/qa/extras/htmlexport/xhtmlexport.cxx
@@ -42,6 +42,18 @@ DECLARE_HTMLEXPORT_TEST(testImageEmbedding, "image-mimetype.odt")
     CPPUNIT_ASSERT(aValue.startsWith("data:image/svg+xml;base64"));
 }
 
+DECLARE_HTMLEXPORT_TEST(testTdf131812, "tdf131812.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(".P1 { font-size:12pt; font-family:Liberation Serif; "
+                        "writing-mode:horizontal-tb; direction:rtl; text-align:right ! important;}")
+        != -1);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/odfexport/data/tdf131812.odt b/sw/qa/extras/odfexport/data/tdf131812.odt
new file mode 100644
index 000000000000..c2833ff25d11
Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf131812.odt differ


More information about the Libreoffice-commits mailing list