diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-04-12 21:20:34 +0200 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2020-04-12 22:01:08 +0200 |
commit | 0733b458f4ad83be8102edec1e1d47c2379ec79e (patch) | |
tree | 4cac29667b51ab1c047b5053135dee9471d392bd /sc | |
parent | bef94cb69c2bee4a66c3ab5a93e399d8a320be0d (diff) |
tdf#41722: Add unittest
Change-Id: I95ff8794addcce6a73d32f49222adffd7d824255
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92090
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/data/xlsx/tdf41722.xlsx | bin | 0 -> 8780 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/tdf41722.xlsx b/sc/qa/unit/data/xlsx/tdf41722.xlsx Binary files differnew file mode 100644 index 000000000000..9ec800ecd9d7 --- /dev/null +++ b/sc/qa/unit/data/xlsx/tdf41722.xlsx diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 2c8940b792d6..b75189fe6618 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -204,6 +204,7 @@ public: void testHeaderImageODS(); void testTdf88657ODS(); + void testTdf41722(); void testEscapeCharInNumberFormatXLSX(); void testNatNumInNumberFormatXLSX(); void testExponentWithoutSignFormatXLSX(); @@ -343,6 +344,7 @@ public: CPPUNIT_TEST(testHeaderImageODS); CPPUNIT_TEST(testTdf88657ODS); + CPPUNIT_TEST(testTdf41722); CPPUNIT_TEST(testEscapeCharInNumberFormatXLSX); CPPUNIT_TEST(testNatNumInNumberFormatXLSX); CPPUNIT_TEST(testExponentWithoutSignFormatXLSX); @@ -4153,6 +4155,21 @@ void ScExportTest::testConditionalFormatOriginXLSX() xDocSh->DoClose(); } +void ScExportTest::testTdf41722() +{ + ScDocShellRef xDocSh = loadDoc("tdf41722.", FORMAT_XLSX); + CPPUNIT_ASSERT(xDocSh.is()); + + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/worksheets/sheet1.xml", FORMAT_XLSX); + CPPUNIT_ASSERT(pDoc); + + assertXPath(pDoc, "//x:conditionalFormatting/x:cfRule[1]", "operator", "containsText"); + assertXPath(pDoc, "//x:conditionalFormatting/x:cfRule[2]", "operator", "containsText"); + assertXPath(pDoc, "//x:conditionalFormatting/x:cfRule[3]", "operator", "containsText"); + + xDocSh->DoClose(); +} + void ScExportTest::testEscapeCharInNumberFormatXLSX() { ScDocShellRef xDocSh = loadDoc("tdf81939.", FORMAT_XLSX); |