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

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 31 16:28:52 UTC 2020


 sc/qa/unit/data/ods/tdf131372.ods     |binary
 sc/qa/unit/subsequent_export-test.cxx |   18 ++++++++++++++++++
 2 files changed, 18 insertions(+)

New commits:
commit 437d30fa8e7daaf12990cf9672614e630e915ba5
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue Mar 31 16:25:10 2020 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Tue Mar 31 18:28:15 2020 +0200

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

diff --git a/sc/qa/unit/data/ods/tdf131372.ods b/sc/qa/unit/data/ods/tdf131372.ods
new file mode 100644
index 000000000000..31d144f4e1f7
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf131372.ods differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 5a1bba02b5f1..7ab066dbeb11 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -233,6 +233,7 @@ public:
     void testRotatedImageODS();
     void testTdf128976();
     void testTdf120502();
+    void testTdf131372();
     void testTdf83779();
 
     CPPUNIT_TEST_SUITE(ScExportTest);
@@ -367,6 +368,7 @@ public:
     CPPUNIT_TEST(testRotatedImageODS);
     CPPUNIT_TEST(testTdf128976);
     CPPUNIT_TEST(testTdf120502);
+    CPPUNIT_TEST(testTdf131372);
     CPPUNIT_TEST(testTdf83779);
 
     CPPUNIT_TEST_SUITE_END();
@@ -4723,6 +4725,22 @@ void ScExportTest::testTdf120502()
     assertXPath(pSheet1, "/x:worksheet/x:cols/x:col", "max", OUString::number(nMaxCol + 1));
 }
 
+void ScExportTest::testTdf131372()
+{
+    ScDocShellRef xShell = loadDoc("tdf131372.", FORMAT_ODS);
+    CPPUNIT_ASSERT(xShell);
+
+    auto pXPathFile = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX);
+
+    xmlDocPtr pSheet = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/worksheets/sheet1.xml");
+    CPPUNIT_ASSERT(pSheet);
+
+    assertXPathContent(pSheet, "/x:worksheet/x:sheetData/x:row/x:c[1]/x:f", "NA()");
+    assertXPathContent(pSheet, "/x:worksheet/x:sheetData/x:row/x:c[2]/x:f", "#N/A");
+
+    xShell->DoClose();
+}
+
 void ScExportTest::testTdf83779()
 {
     // Roundtripping TRUE/FALSE constants (not functions) must convert them to functions


More information about the Libreoffice-commits mailing list