diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-09-06 10:13:58 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-09-06 11:16:50 +0200 |
commit | f2d7f2a28c4334feed4a12eb1553b8d0563c0fc9 (patch) | |
tree | 407a5f15ac3ec5704159d804bb098a351995691b | |
parent | 30a3f2b7343be07f10c8cbf7f4a9e90e16db806e (diff) |
tdf#150599: sc_filters_test: Add unittest
Change-Id: Ibc6434b3505276343da0a36c52ab175aefc518ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139470
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | sc/qa/unit/data/dif/tdf150599.dif | 81 | ||||
-rw-r--r-- | sc/qa/unit/filters-test.cxx | 16 |
2 files changed, 97 insertions, 0 deletions
diff --git a/sc/qa/unit/data/dif/tdf150599.dif b/sc/qa/unit/data/dif/tdf150599.dif new file mode 100644 index 000000000000..4c60f8be2749 --- /dev/null +++ b/sc/qa/unit/data/dif/tdf150599.dif @@ -0,0 +1,81 @@ +TABLE
+0,1
+"EXCEL"
+VECTORS
+0,315
+""
+TUPLES
+0,32
+""
+DATA
+0,0
+""
+-1,0
+BOT
+0,1
+V
+0,2
+V
+0,3
+V
+0,4
+V
+0,5
+V
+0,6
+V
+0,7
+V
+0,8
+V
+0,9
+V
+0,10
+V
+0,11
+V
+0,12
+V
+0,13
+V
+0,14
+V
+0,15
+V
+0,16
+V
+0,17
+V
+0,18
+V
+0,19
+V
+0,20
+V
+0,21
+V
+0,22
+V
+0,23
+V
+0,24
+V
+0,25
+V
+0,26
+V
+0,27
+V
+0,28
+V
+0,29
+V
+0,30
+V
+0,31
+V
+0,32
+V
+-1,0
+
+EOD
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx index 55e845417d07..738f36e9828d 100644 --- a/sc/qa/unit/filters-test.cxx +++ b/sc/qa/unit/filters-test.cxx @@ -74,6 +74,7 @@ public: void testSharedFormulaRefUpdateXLSX(); void testSheetNamesXLSX(); void testTdf79998(); + void testTdf150599(); void testCommentSize(); void testLegacyCellAnchoredRotatedShape(); void testEnhancedProtectionXLS(); @@ -103,6 +104,7 @@ public: CPPUNIT_TEST(testSharedFormulaRefUpdateXLSX); CPPUNIT_TEST(testSheetNamesXLSX); CPPUNIT_TEST(testTdf79998); + CPPUNIT_TEST(testTdf150599); CPPUNIT_TEST(testCommentSize); CPPUNIT_TEST(testLegacyCellAnchoredRotatedShape); CPPUNIT_TEST(testEnhancedProtectionXLS); @@ -489,6 +491,20 @@ void ScFiltersTest::testTdf79998() xDocSh->DoClose(); } +void ScFiltersTest::testTdf150599() +{ + ScDocShellRef xDocSh = loadDoc(u"tdf150599.", FORMAT_DIF); + ScDocument& rDoc = xDocSh->GetDocument(); + + // Without the fix in place, this test would have failed with + // - Expected: 1 + // - Actual : #IND:? + CPPUNIT_ASSERT_EQUAL(OUString("1"), rDoc.GetString(ScAddress(0, 0, 0))); + CPPUNIT_ASSERT_EQUAL(OUString("32"), rDoc.GetString(ScAddress(31, 0, 0))); + + xDocSh->DoClose(); +} + void ScFiltersTest::testCommentSize() { ScDocShellRef xDocSh = loadDoc(u"comment.", FORMAT_ODS); |