tdf#130959: Add unittest
Change-Id: Ib66a2a48b6e0d746fc54d2b1987a574c26ea1c1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89619
Tested-by: Jenkins
Reviewed-by: Xisco FaulĂ <xiscofauli@libreoffice.org>
diff --git a/sc/qa/unit/data/xlsx/tdf130959.xlsx b/sc/qa/unit/data/xlsx/tdf130959.xlsx
new file mode 100644
index 0000000..3f1b16c
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/tdf130959.xlsx
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 4038430..ecc1a10 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -227,6 +227,7 @@ public:
void testTdf100709XLSX();
void testTdf97598XLSX();
void testTdf110440XLSX();
void testTdf130959();
void testTdf111974XLSM();
void testTdf83672XLSX();
@@ -371,6 +372,7 @@ public:
CPPUNIT_TEST(testTdf100709XLSX);
CPPUNIT_TEST(testTdf97598XLSX);
CPPUNIT_TEST(testTdf110440XLSX);
CPPUNIT_TEST(testTdf130959);
CPPUNIT_TEST(testTdf111974XLSM);
CPPUNIT_TEST(testTdf83672XLSX);
@@ -3540,6 +3542,14 @@ void ScFiltersTest::testTdf110440XLSX()
xDocSh->DoClose();
}
void ScFiltersTest::testTdf130959()
{
// Would crash without the fix on loading
ScDocShellRef xDocSh = loadDoc("tdf130959.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
xDocSh->DoClose();
}
void ScFiltersTest::testTdf111974XLSM()
{
// Would crash without the fix on loading