[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 11 22:21:24 UTC 2021
sc/qa/unit/data/ods/tdf76310.ods |binary
sc/qa/unit/subsequent_filters-test.cxx | 21 +++++++++++++++++++++
2 files changed, 21 insertions(+)
New commits:
commit 3c0c1b79b689775f09b3bff75bb01118b380f41f
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed Aug 11 20:42:17 2021 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu Aug 12 00:20:50 2021 +0200
tdf#76310: subsequent_filters: Add unittest
Change-Id: If39bb4e3c7e767f273351cb381ea055e3934de2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120338
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sc/qa/unit/data/ods/tdf76310.ods b/sc/qa/unit/data/ods/tdf76310.ods
new file mode 100644
index 000000000000..219437acfe29
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf76310.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 75ff20e23034..b48e9a2df575 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -115,6 +115,7 @@ public:
void testUpdateCircleInMergedCellODS();
void testDeleteCircleInMergedCellODS();
void testBooleanFormatXLSX();
+ void testTdf76310();
void testBasicCellContentODS();
void testRangeNameXLS();
void testRangeNameLocalXLS();
@@ -224,6 +225,7 @@ public:
CPPUNIT_TEST(testUpdateCircleInMergedCellODS);
CPPUNIT_TEST(testDeleteCircleInMergedCellODS);
CPPUNIT_TEST(testBooleanFormatXLSX);
+ CPPUNIT_TEST(testTdf76310);
CPPUNIT_TEST(testBasicCellContentODS);
CPPUNIT_TEST(testRangeNameXLS);
CPPUNIT_TEST(testRangeNameLocalXLS);
@@ -671,6 +673,25 @@ void ScFiltersTest::testBooleanFormatXLSX()
xDocSh->DoClose();
}
+void ScFiltersTest::testTdf76310()
+{
+ ScDocShellRef xDocSh = loadDoc(u"tdf76310.", FORMAT_ODS);
+
+ ScDocument& rDoc = xDocSh->GetDocument();
+
+ OUString aFormula;
+ rDoc.GetFormula(0, 0, 0, aFormula);
+ // Without the fix in place, this test would have failed with
+ // - Expected: =1
+ // +
+ // 2
+ // - Actual : =1 + 2
+ CPPUNIT_ASSERT_EQUAL(OUString("=1\n+\n2"), aFormula);
+ ASSERT_DOUBLES_EQUAL(3.0, rDoc.GetValue(0, 0, 0));
+
+ xDocSh->DoClose();
+}
+
void ScFiltersTest::testRangeNameXLS()
{
ScDocShellRef xDocSh = loadDoc(u"named-ranges-global.", FORMAT_XLS);
More information about the Libreoffice-commits
mailing list