diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-01-26 17:16:41 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-01-26 21:07:35 +0100 |
commit | bb7ba2e134ecc08142d2b0bcdb8c861e77a8f3d6 (patch) | |
tree | 307dd53f3ec4f8a11d91ca755953d8cf938a4590 /sc | |
parent | 7a7f72c30e888222ea8fc92327cdb7743f2307aa (diff) |
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@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/data/ods/tdf126116.ods | bin | 0 -> 7813 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 20 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/tdf126116.ods b/sc/qa/unit/data/ods/tdf126116.ods Binary files differnew file mode 100644 index 000000000000..c9fb2816e21c --- /dev/null +++ b/sc/qa/unit/data/ods/tdf126116.ods 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); |