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

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 16 08:26:38 UTC 2021


 sc/qa/unit/data/ods/tdf112780.ods      |binary
 sc/qa/unit/subsequent_filters-test.cxx |   21 +++++++++++++++++++++
 2 files changed, 21 insertions(+)

New commits:
commit ca28c94bde551a07a2b61bf91b7a55c93497d451
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Mon Mar 15 21:39:21 2021 +0100
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Mar 16 09:25:50 2021 +0100

    tdf#112780: sc_subsequent_filters: Add unittest
    
    Change-Id: Ifcf09bc40dd8ce3304b87a902f9d8d9991b62531
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112541
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sc/qa/unit/data/ods/tdf112780.ods b/sc/qa/unit/data/ods/tdf112780.ods
new file mode 100644
index 000000000000..41939b8ac56d
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf112780.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index fd553fa15260..7dd6fee558be 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -296,6 +296,7 @@ public:
     void testTdf137091();
     void testTdf62268();
     void testTdf137453();
+    void testTdf112780();
     void testTdf72470();
     void testTdf35636();
     void testVBAMacroFunctionODS();
@@ -490,6 +491,7 @@ public:
     CPPUNIT_TEST(testTdf137091);
     CPPUNIT_TEST(testTdf62268);
     CPPUNIT_TEST(testTdf137453);
+    CPPUNIT_TEST(testTdf112780);
     CPPUNIT_TEST(testTdf72470);
     CPPUNIT_TEST(testTdf35636);
     CPPUNIT_TEST(testVBAMacroFunctionODS);
@@ -5210,6 +5212,25 @@ void ScFiltersTest::testTdf137453()
     xDocSh->DoClose();
 }
 
+void ScFiltersTest::testTdf112780()
+{
+    ScDocShellRef xDocSh = loadDoc(u"tdf112780.", FORMAT_ODS);
+    CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
+
+    ScDocument& rDoc = xDocSh->GetDocument();
+
+    // Without the fix in place, this test would haved failed with
+    // - Expected:
+    // - Actual  : #VALUE!
+    CPPUNIT_ASSERT_EQUAL(OUString(""), rDoc.GetString(ScAddress(3,5,0)));
+
+    OUString aFormula;
+    rDoc.GetFormula(3, 5, 0, aFormula);
+    CPPUNIT_ASSERT_EQUAL(OUString("=G6+J6+M6"), aFormula);
+
+    xDocSh->DoClose();
+}
+
 void ScFiltersTest::testTdf72470()
 {
     // Without the fix in place, this test would have hung


More information about the Libreoffice-commits mailing list