[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Wed Mar 3 22:47:24 UTC 2021
sc/qa/unit/data/ods/tdf42481.ods |binary
sc/qa/unit/subsequent_filters-test.cxx | 17 +++++++++++++++++
2 files changed, 17 insertions(+)
New commits:
commit 722ec600e85cca2e94e82e69f8d13773061172b9
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed Mar 3 21:08:21 2021 +0100
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Mar 3 23:46:39 2021 +0100
tdf#42481: sc_subsequent_filters: Add unittest
Change-Id: Ie8bccee362dc14ce3b5d635151f46564026ccd48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111938
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sc/qa/unit/data/ods/tdf42481.ods b/sc/qa/unit/data/ods/tdf42481.ods
new file mode 100644
index 000000000000..ce84fa7b1665
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf42481.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index fa969a78c4d0..fd553fa15260 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -285,6 +285,7 @@ public:
void testTdf130583();
void testTdf85617();
void testTdf134234();
+ void testTdf42481();
void testNamedExpressionsXLSXML();
void testEmptyRowsXLSXML();
void testBorderDirectionsXLSXML();
@@ -477,6 +478,7 @@ public:
CPPUNIT_TEST(testTdf130583);
CPPUNIT_TEST(testTdf85617);
CPPUNIT_TEST(testTdf134234);
+ CPPUNIT_TEST(testTdf42481);
CPPUNIT_TEST(testNamedExpressionsXLSXML);
CPPUNIT_TEST(testEmptyRowsXLSXML);
CPPUNIT_TEST(testBorderDirectionsXLSXML);
@@ -4635,6 +4637,21 @@ void ScFiltersTest::testTdf134234()
CPPUNIT_ASSERT_EQUAL(sal_uInt32(833), static_cast<sal_uInt32>(rDoc.GetValue(ScAddress(3,0,1))));
}
+void ScFiltersTest::testTdf42481()
+{
+ ScDocShellRef xDocSh = loadDoc(u"tdf42481.", FORMAT_ODS);
+ CPPUNIT_ASSERT_MESSAGE("Failed to load the document", xDocSh.is());
+ ScDocument& rDoc = xDocSh->GetDocument();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("#VALUE!"), rDoc.GetString(ScAddress(3,9,0)));
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: #VALUE!
+ // - Actual : 14
+ CPPUNIT_ASSERT_EQUAL(OUString("#VALUE!"), rDoc.GetString(ScAddress(3,10,0)));
+ CPPUNIT_ASSERT_EQUAL(OUString("14"), rDoc.GetString(ScAddress(3,11,0)));
+}
+
void ScFiltersTest::testNamedExpressionsXLSXML()
{
{
More information about the Libreoffice-commits
mailing list