summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2024-06-21 17:07:39 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2024-06-21 19:37:49 +0200
commita820696263e62ffc7ebe0a9f6d51bec2e1354926 (patch)
treeefff1da9c0430c5537b5de47e9d0f758b4e8998a
parentc5bbbe987321d8f9e101fab9d67ddbf3d4f8dfca (diff)
tdf#161631: sw_ooxmlexport21: Add unittest
Change-Id: I1496b82e67c5f408bd682b4998e3afaf74c37318 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169339 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf161631.docxbin0 -> 18496 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport21.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf161631.docx b/sw/qa/extras/ooxmlexport/data/tdf161631.docx
new file mode 100644
index 000000000000..a1e91c05633c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf161631.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx
index 81a5703b9ced..43dff8ae68cf 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx
@@ -38,6 +38,17 @@ public:
}
};
+DECLARE_OOXMLEXPORT_TEST(testTdf161631, "tdf161631.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: Some text
+ // - Actual :
+ CPPUNIT_ASSERT_EQUAL(u"Some text"_ustr, getParagraph(1)->getString());
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf158597, "tdf158597.docx")
{
// test with 2 properties: font size, italic (toggle)