summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-02-10 16:11:25 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2023-02-10 19:50:43 +0000
commitd367cefb0281767762b1671c03b3852cf3d1b7ab (patch)
tree9b266f55143a82829845c7e9b7c12757b4b1962e /sc
parent88cee07ee023899ffd482bbe52bf0c02c58890d0 (diff)
tdf#139934: sc_subsequent_filters_test: Add unittest
Change-Id: Ib1540bb7058606c7629ce0459fd18bd463e99998 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146786 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/data/xlsx/tdf139934.xlsxbin0 -> 5985 bytes
-rw-r--r--sc/qa/unit/subsequent_filters_test.cxx15
2 files changed, 15 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/tdf139934.xlsx b/sc/qa/unit/data/xlsx/tdf139934.xlsx
new file mode 100644
index 000000000000..c4fcf6905df4
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/tdf139934.xlsx
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters_test.cxx b/sc/qa/unit/subsequent_filters_test.cxx
index fd0aa159467b..7749106a3883 100644
--- a/sc/qa/unit/subsequent_filters_test.cxx
+++ b/sc/qa/unit/subsequent_filters_test.cxx
@@ -88,6 +88,7 @@ public:
void testContentXLS_XML();
void testContentGnumeric();
void testCondFormatOperatorsSameRangeXLSX();
+ void testTdf139934();
void testTdf150452();
void testTdf119292();
void testTdf48731();
@@ -219,6 +220,7 @@ public:
CPPUNIT_TEST(testContentXLS_XML);
CPPUNIT_TEST(testContentGnumeric);
CPPUNIT_TEST(testCondFormatOperatorsSameRangeXLSX);
+ CPPUNIT_TEST(testTdf139934);
CPPUNIT_TEST(testTdf150452);
CPPUNIT_TEST(testTdf119292);
CPPUNIT_TEST(testTdf48731);
@@ -563,6 +565,19 @@ void ScFiltersTest::testTdf119292()
CPPUNIT_ASSERT_EQUAL(Point(114, 54), aPoly270Pos3);
}
+void ScFiltersTest::testTdf139934()
+{
+ createScDoc("xlsx/tdf139934.xlsx");
+
+ ScDocument* pDoc = getScDoc();
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 1/20/2021
+ // - Actual : 44216
+ CPPUNIT_ASSERT_EQUAL(OUString("1/20/2021"), pDoc->GetString(0, 2, 0));
+ CPPUNIT_ASSERT_EQUAL(OUString("11/25/2020"), pDoc->GetString(0, 61, 0));
+}
+
void ScFiltersTest::testTdf150452()
{
// Without the fix in place, this test would have crashed