summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-09-16 19:11:02 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2020-09-17 10:41:22 +0200
commitd8ca58f46a99d4502f75ce8177b09d2841ce3489 (patch)
treebc8d5ad8b182a958536ab78ef99cafad5773b0a0 /sw/qa/extras
parentcded40e436340163fd537946749019b68800be4d (diff)
tdf#129520 : sw_odfexport: Add unittest
Change-Id: I6df242c276ceafb325d8d9fc609dae8bb449093b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102881 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/odfexport/data/tdf129520.docxbin0 -> 15574 bytes
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx12
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/data/tdf129520.docx b/sw/qa/extras/odfexport/data/tdf129520.docx
new file mode 100644
index 000000000000..4f74826ada5c
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/tdf129520.docx
Binary files differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index bf7b02e13704..264edddea196 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -1620,6 +1620,18 @@ DECLARE_ODFEXPORT_TEST(testBtlrFrame, "btlr-frame.odt")
CPPUNIT_ASSERT(!pFlyFrame->IsVertLRBT());
}
+DECLARE_ODFEXPORT_TEST(testTdf129520, "tdf129520.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ CPPUNIT_ASSERT_EQUAL(OUString("M"), getParagraph(1)->getString());
+
+ // Without this fix in place, this test would have failed with
+ // - Expected: Ma
+ // - Actual :
+ CPPUNIT_ASSERT_EQUAL(OUString("Ma"), getParagraph(2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("1815"), getParagraph(3)->getString());
+}
+
DECLARE_ODFEXPORT_TEST(testFdo86963, "fdo86963.odt")
{
CPPUNIT_ASSERT_EQUAL(1, getPages());