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

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Tue Jan 26 20:08:21 UTC 2021


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

New commits:
commit bb7ba2e134ecc08142d2b0bcdb8c861e77a8f3d6
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue Jan 26 17:16:41 2021 +0100
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Jan 26 21:07:35 2021 +0100

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

diff --git a/sc/qa/unit/data/ods/tdf126116.ods b/sc/qa/unit/data/ods/tdf126116.ods
new file mode 100644
index 000000000000..c9fb2816e21c
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf126116.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 08df4482ef66..7ceee84f63ae 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -241,6 +241,7 @@ public:
 
     void testTdf136364();
     void testTdf103734();
+    void testTdf126116();
     void testTdf98844();
     void testTdf100458();
     void testTdf118561();
@@ -427,6 +428,7 @@ public:
 
     CPPUNIT_TEST(testTdf136364);
     CPPUNIT_TEST(testTdf103734);
+    CPPUNIT_TEST(testTdf126116);
     CPPUNIT_TEST(testTdf98844);
     CPPUNIT_TEST(testTdf100458);
     CPPUNIT_TEST(testTdf118561);
@@ -4045,6 +4047,24 @@ void ScFiltersTest::testTdf103734()
     xDocSh->DoClose();
 }
 
+void ScFiltersTest::testTdf126116()
+{
+    ScDocShellRef xDocSh = loadDoc(u"tdf126116.", FORMAT_ODS);
+    CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
+    ScDocument& rDoc = xDocSh->GetDocument();
+
+    CPPUNIT_ASSERT_EQUAL(OUString("02/02/21"), rDoc.GetString(ScAddress(0,0,0)));
+
+    rDoc.SetString(ScAddress(0,0,0), "03/03");
+
+    // Without the fix in place, this test would have failed with
+    // - Expected: 03/03/21
+    // - Actual  : 03/03/2021
+    CPPUNIT_ASSERT_EQUAL(OUString("03/03/21"), rDoc.GetString(ScAddress(0,0,0)));
+
+    xDocSh->DoClose();
+}
+
 void ScFiltersTest::testTdf98844()
 {
     ScDocShellRef xDocSh = loadDoc(u"tdf98844.", FORMAT_ODS);


More information about the Libreoffice-commits mailing list