[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Sun Sep 6 14:57:04 UTC 2020
sc/qa/unit/data/ods/tdf132105.ods |binary
sc/qa/unit/data/ods/tdf132105_external.ods |binary
sc/qa/unit/subsequent_filters-test.cxx | 30 +++++++++++++++++++++++++++++
3 files changed, 30 insertions(+)
New commits:
commit e68febccd3926635da3a64b99b01d3eff0273919
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Sun Sep 6 13:56:17 2020 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Sun Sep 6 16:56:20 2020 +0200
tdf#132105: sc_subsequent_filters_test: Add unittest
Change-Id: I69aa6fc27c095a920c22a84e6e84e78b0230e46b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102102
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sc/qa/unit/data/ods/tdf132105.ods b/sc/qa/unit/data/ods/tdf132105.ods
new file mode 100644
index 000000000000..380bfe0b8752
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf132105.ods differ
diff --git a/sc/qa/unit/data/ods/tdf132105_external.ods b/sc/qa/unit/data/ods/tdf132105_external.ods
new file mode 100644
index 000000000000..ca6a10edf8a4
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf132105_external.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index a09bb1b33676..bbedc4b46f0b 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -235,6 +235,7 @@ public:
void testTdf119533();
void testTdf127982();
void testTdf109409();
+ void testTdf132105();
void testTdf131424();
void testTdf100709XLSX();
void testTdf97598XLSX();
@@ -401,6 +402,7 @@ public:
CPPUNIT_TEST(testTdf119533);
CPPUNIT_TEST(testTdf127982);
CPPUNIT_TEST(testTdf109409);
+ CPPUNIT_TEST(testTdf132105);
CPPUNIT_TEST(testTdf131424);
CPPUNIT_TEST(testTdf100709XLSX);
CPPUNIT_TEST(testTdf97598XLSX);
@@ -3932,6 +3934,34 @@ void ScFiltersTest::testTdf109409()
xDocSh->DoClose();
}
+void ScFiltersTest::testTdf132105()
+{
+ ScDocShellRef xDocSh = loadDoc("tdf132105.", FORMAT_ODS);
+ CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
+ ScDocument& rDoc = xDocSh->GetDocument();
+
+ // MATCH
+ CPPUNIT_ASSERT_EQUAL(OUString("5"), rDoc.GetString(ScAddress(0,1,0)));
+ CPPUNIT_ASSERT_EQUAL(OUString("5"), rDoc.GetString(ScAddress(1,1,0)));
+
+ // COUNT
+ CPPUNIT_ASSERT_EQUAL(OUString("0"), rDoc.GetString(ScAddress(0,2,0)));
+ CPPUNIT_ASSERT_EQUAL(OUString("20"), rDoc.GetString(ScAddress(1,2,0)));
+
+ // COUNTA
+ CPPUNIT_ASSERT_EQUAL(OUString("20"), rDoc.GetString(ScAddress(0,3,0)));
+ CPPUNIT_ASSERT_EQUAL(OUString("20"), rDoc.GetString(ScAddress(1,3,0)));
+
+ // COUNTBLANK
+ // Without the fix in place, it would have failed with
+ // - Expected: 0
+ //- Actual : Err:504
+ CPPUNIT_ASSERT_EQUAL(OUString("0"), rDoc.GetString(ScAddress(0,4,0)));
+ CPPUNIT_ASSERT_EQUAL(OUString("0"), rDoc.GetString(ScAddress(1,4,0)));
+
+ xDocSh->DoClose();
+}
+
void ScFiltersTest::testTdf131424()
{
ScDocShellRef xDocSh = loadDoc("tdf131424.", FORMAT_XLSX);
More information about the Libreoffice-commits
mailing list