diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-09-06 14:34:28 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-09-06 16:55:47 +0200 |
commit | a36455c8d1aba28ca593a90f2957078934ea5700 (patch) | |
tree | 4f390a0e3af1f4084b8b8ef287ca13d321f88fc6 | |
parent | e12ac66a15b61d25105dce8fac82ed80d918a511 (diff) |
tdf#118561: sc_subsequent_filters_test: Add unittest
Change-Id: Ia1edcdb2931db0dd7b9174a697711c6d79ff9a13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102103
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | sc/qa/unit/data/ods/tdf118561.ods | bin | 0 -> 13386 bytes | |||
-rw-r--r-- | sc/qa/unit/data/ods/tdf118561_external.ods | bin | 0 -> 16023 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 21 |
3 files changed, 21 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/tdf118561.ods b/sc/qa/unit/data/ods/tdf118561.ods Binary files differnew file mode 100644 index 000000000000..ba445f45a250 --- /dev/null +++ b/sc/qa/unit/data/ods/tdf118561.ods diff --git a/sc/qa/unit/data/ods/tdf118561_external.ods b/sc/qa/unit/data/ods/tdf118561_external.ods Binary files differnew file mode 100644 index 000000000000..c70025980043 --- /dev/null +++ b/sc/qa/unit/data/ods/tdf118561_external.ods diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 463944a61d4c..a09bb1b33676 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -230,6 +230,7 @@ public: void testTdf103734(); void testTdf98844(); void testTdf100458(); + void testTdf118561(); void testTdf134455(); void testTdf119533(); void testTdf127982(); @@ -395,6 +396,7 @@ public: CPPUNIT_TEST(testTdf103734); CPPUNIT_TEST(testTdf98844); CPPUNIT_TEST(testTdf100458); + CPPUNIT_TEST(testTdf118561); CPPUNIT_TEST(testTdf134455); CPPUNIT_TEST(testTdf119533); CPPUNIT_TEST(testTdf127982); @@ -3822,6 +3824,25 @@ void ScFiltersTest::testTdf100458() xDocSh->DoClose(); } +void ScFiltersTest::testTdf118561() +{ + ScDocShellRef xDocSh = loadDoc("tdf118561.", FORMAT_ODS); + CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is()); + ScDocument& rDoc = xDocSh->GetDocument(); + + //Without the fix in place, it would have failed with + //- Expected: apple + //- Actual : Err:502 + CPPUNIT_ASSERT_EQUAL(OUString("apple"), rDoc.GetString(ScAddress(1,1,1))); + CPPUNIT_ASSERT_EQUAL(OUString("apple"), rDoc.GetString(ScAddress(2,1,1))); + CPPUNIT_ASSERT_EQUAL(OUString("TRUE"), rDoc.GetString(ScAddress(3,1,1))); + CPPUNIT_ASSERT_EQUAL(OUString("fruits"), rDoc.GetString(ScAddress(4,1,1))); + CPPUNIT_ASSERT_EQUAL(OUString("apple"), rDoc.GetString(ScAddress(5,1,1))); + CPPUNIT_ASSERT_EQUAL(OUString("hat"), rDoc.GetString(ScAddress(6,1,1))); + + xDocSh->DoClose(); +} + void ScFiltersTest::testTdf134455() { ScDocShellRef xDocSh = loadDoc("tdf134455.", FORMAT_XLSX); |