Kaydet (Commit) 5bba4c56 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

fdo#72041: Add import test to catch an issue with external ref cache.

Change-Id: I648d2d04c86d61b1cbe291e7aa79bf9219833328
üst 75a22a9f
......@@ -160,6 +160,7 @@ public:
void testSharedFormulaHorizontalXLS();
void testExternalRefCacheXLSX();
void testExternalRefCacheODS();
CPPUNIT_TEST_SUITE(ScFiltersTest);
CPPUNIT_TEST(testBasicCellContentODS);
......@@ -236,6 +237,7 @@ public:
CPPUNIT_TEST(testColumnStyleXLSX);
CPPUNIT_TEST(testSharedFormulaHorizontalXLS);
CPPUNIT_TEST(testExternalRefCacheXLSX);
CPPUNIT_TEST(testExternalRefCacheODS);
CPPUNIT_TEST_SUITE_END();
private:
......@@ -2488,6 +2490,21 @@ void ScFiltersTest::testExternalRefCacheXLSX()
xDocSh->DoClose();
}
void ScFiltersTest::testExternalRefCacheODS()
{
ScDocShellRef xDocSh = loadDoc("external-ref-cache.", ODS);
CPPUNIT_ASSERT(xDocSh.Is());
ScDocument* pDoc = xDocSh->GetDocument();
// Cells B2:B4 have VLOOKUP with external references which should all show "text".
CPPUNIT_ASSERT_EQUAL(OUString("text"), pDoc->GetString(ScAddress(1,1,0)));
CPPUNIT_ASSERT_EQUAL(OUString("text"), pDoc->GetString(ScAddress(1,2,0)));
CPPUNIT_ASSERT_EQUAL(OUString("text"), pDoc->GetString(ScAddress(1,3,0)));
xDocSh->DoClose();
}
ScFiltersTest::ScFiltersTest()
: ScBootstrapFixture( "/sc/qa/unit/data" )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment