diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-09-06 13:56:17 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-09-06 16:56:20 +0200 |
commit | e68febccd3926635da3a64b99b01d3eff0273919 (patch) | |
tree | 3ef846e7c6159f2f052ecd9c5e986931b009aca0 /sc/qa | |
parent | a36455c8d1aba28ca593a90f2957078934ea5700 (diff) |
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@libreoffice.org>
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/data/ods/tdf132105.ods | bin | 0 -> 12608 bytes | |||
-rw-r--r-- | sc/qa/unit/data/ods/tdf132105_external.ods | bin | 0 -> 14442 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 30 |
3 files changed, 30 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/tdf132105.ods b/sc/qa/unit/data/ods/tdf132105.ods Binary files differnew file mode 100644 index 000000000000..380bfe0b8752 --- /dev/null +++ b/sc/qa/unit/data/ods/tdf132105.ods diff --git a/sc/qa/unit/data/ods/tdf132105_external.ods b/sc/qa/unit/data/ods/tdf132105_external.ods Binary files differnew file mode 100644 index 000000000000..ca6a10edf8a4 --- /dev/null +++ b/sc/qa/unit/data/ods/tdf132105_external.ods 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); |