diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-09-10 21:41:59 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-09-11 00:46:29 +0200 |
commit | ed4f610f4a3de12016f8308a17b6ad4f86e9d67a (patch) | |
tree | cf7bd83f3143cc5c3984715951a55802eb1e6a86 | |
parent | 55a6ecb44d45afc5033969c0c8b0245497477aed (diff) |
tdf#136645: sw_odfexport: Add unittest
Change-Id: I0ec82de4932f4200aeb7cf778bf93dd9d1c28eda
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102402
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | sw/qa/extras/odfexport/data/tdf136645.odt | bin | 0 -> 18408 bytes | |||
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 14 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/data/tdf136645.odt b/sw/qa/extras/odfexport/data/tdf136645.odt Binary files differnew file mode 100644 index 000000000000..a8487c317347 --- /dev/null +++ b/sw/qa/extras/odfexport/data/tdf136645.odt diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 20c8b25f0b48..bf7b02e13704 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -1530,6 +1530,20 @@ DECLARE_ODFEXPORT_TEST(testWhitespace, "whitespace.odt") CPPUNIT_ASSERT(!xPortions->hasMoreElements()); } +DECLARE_ODFEXPORT_TEST(testTdf136645, "tdf136645.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + + // Without the fix in place, this would have failed with + //- Expected: 2640 + //- Actual : 3000 + CPPUNIT_ASSERT_EQUAL(sal_Int32(2640), parseDump("/root/page/body/section/column[1]/body/infos/bounds", "width").toInt32()); + + //- Expected: 6000 + //- Actual : 6360 + CPPUNIT_ASSERT_EQUAL(sal_Int32(6000), parseDump("/root/page/body/section/column[2]/body/infos/bounds", "width").toInt32()); +} + DECLARE_ODFEXPORT_TEST(testBtlrCell, "btlr-cell.odt") { CPPUNIT_ASSERT_EQUAL(1, getPages()); |