sc/qa/unit/data/ods/tdf129681.ods |binary sc/qa/unit/subsequent_filters-test.cxx | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+)
New commits: commit 389008b0497793283e652050e32267370326855f Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Fri Jun 26 16:22:48 2020 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Jun 26 18:35:39 2020 +0200 tdf#129681: sc: Add unittest Change-Id: I160774b1b3d32fb5521d3f7a184f33922839bb1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97239 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sc/qa/unit/data/ods/tdf129681.ods b/sc/qa/unit/data/ods/tdf129681.ods new file mode 100644 index 000000000000..21fb06c24e81 Binary files /dev/null and b/sc/qa/unit/data/ods/tdf129681.ods differ diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index f44980c7a146..35b490729fef 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -231,6 +231,7 @@ public: void testTdf132278(); void testTdf130959(); void testTdf131380(); + void testTdf129681(); void testTdf111974XLSM(); void testTdf83672XLSX(); @@ -383,6 +384,7 @@ public: CPPUNIT_TEST(testTdf132278); CPPUNIT_TEST(testTdf130959); CPPUNIT_TEST(testTdf131380); + CPPUNIT_TEST(testTdf129681); CPPUNIT_TEST(testTdf111974XLSM); CPPUNIT_TEST(testTdf83672XLSX); @@ -3588,6 +3590,34 @@ void ScFiltersTest::testTdf131380() xDocSh->DoClose(); } +void ScFiltersTest::testTdf129681() +{ + ScDocShellRef xDocSh = loadDoc("tdf129681.", FORMAT_ODS); + CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is()); + + ScDocument& rDoc = xDocSh->GetDocument(); + + CPPUNIT_ASSERT_EQUAL(OUString("Lamb"), rDoc.GetString(ScAddress(4,2,0))); + CPPUNIT_ASSERT_EQUAL(OUString("Beef"), rDoc.GetString(ScAddress(4,3,0))); + CPPUNIT_ASSERT_EQUAL(OUString("Pork"), rDoc.GetString(ScAddress(4,4,0))); + CPPUNIT_ASSERT_EQUAL(OUString("Goat"), rDoc.GetString(ScAddress(4,5,0))); + CPPUNIT_ASSERT_EQUAL(OUString("Goat"), rDoc.GetString(ScAddress(4,6,0))); + CPPUNIT_ASSERT_EQUAL(OUString("#VALUE!"), rDoc.GetString(ScAddress(4,7,0))); + CPPUNIT_ASSERT_EQUAL(OUString("#VALUE!"), rDoc.GetString(ScAddress(4,8,0))); + CPPUNIT_ASSERT_EQUAL(OUString("Deer"), rDoc.GetString(ScAddress(4,9,0))); + + CPPUNIT_ASSERT_EQUAL(OUString("1"), rDoc.GetString(ScAddress(6,2,0))); + CPPUNIT_ASSERT_EQUAL(OUString("2"), rDoc.GetString(ScAddress(6,3,0))); + CPPUNIT_ASSERT_EQUAL(OUString("3"), rDoc.GetString(ScAddress(6,4,0))); + CPPUNIT_ASSERT_EQUAL(OUString("5"), rDoc.GetString(ScAddress(6,5,0))); + CPPUNIT_ASSERT_EQUAL(OUString("8"), rDoc.GetString(ScAddress(6,6,0))); + CPPUNIT_ASSERT_EQUAL(OUString("#VALUE!"), rDoc.GetString(ScAddress(6,7,0))); + CPPUNIT_ASSERT_EQUAL(OUString("#VALUE!"), rDoc.GetString(ScAddress(6,8,0))); + CPPUNIT_ASSERT_EQUAL(OUString("#VALUE!"), rDoc.GetString(ScAddress(6,9,0))); + + xDocSh->DoClose(); +} + void ScFiltersTest::testTdf111974XLSM() { // Would crash without the fix on loading _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits