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

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Sun Apr 12 20:01:44 UTC 2020


 sc/qa/unit/data/xlsx/tdf41722.xlsx    |binary
 sc/qa/unit/subsequent_export-test.cxx |   17 +++++++++++++++++
 2 files changed, 17 insertions(+)

New commits:
commit 0733b458f4ad83be8102edec1e1d47c2379ec79e
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Sun Apr 12 21:20:34 2020 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Sun Apr 12 22:01:08 2020 +0200

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

diff --git a/sc/qa/unit/data/xlsx/tdf41722.xlsx b/sc/qa/unit/data/xlsx/tdf41722.xlsx
new file mode 100644
index 000000000000..9ec800ecd9d7
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf41722.xlsx differ
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);


More information about the Libreoffice-commits mailing list