diff options
author | Maarten Bosmans <mkbosmans@gmail.com> | 2016-09-07 22:11:26 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-09-09 01:31:04 +0000 |
commit | 6cf44da0395ce5d8dc9cfda838fb15c593507363 (patch) | |
tree | 8db5c67cbc28b8670193e8db221d9fb4350fbe36 | |
parent | 4a751b119129fc3c924b92cc9d527ab9b504b5c5 (diff) |
Related: tdf#100709 Add unit test
This tests for the two bugs fixed in d16070a3.
Change-Id: I453fc603ca98895c56c6e8df6315b8d1ea96bfde
Reviewed-on: https://gerrit.libreoffice.org/28734
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r-- | sc/qa/unit/data/xlsx/tdf100709.xlsx | bin | 0 -> 4583 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 14 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/tdf100709.xlsx b/sc/qa/unit/data/xlsx/tdf100709.xlsx Binary files differnew file mode 100644 index 000000000000..87698bb131de --- /dev/null +++ b/sc/qa/unit/data/xlsx/tdf100709.xlsx diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index c538ec7b056f..42aa39104b5d 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -216,6 +216,7 @@ public: void testBnc762542(); void testTdf100458(); + void testTdf100709XLSX(); CPPUNIT_TEST_SUITE(ScFiltersTest); CPPUNIT_TEST(testBooleanFormatXLSX); @@ -321,6 +322,7 @@ public: CPPUNIT_TEST(testHiddenSheetsXLSX); CPPUNIT_TEST(testTdf100458); + CPPUNIT_TEST(testTdf100709XLSX); CPPUNIT_TEST_SUITE_END(); @@ -3342,6 +3344,18 @@ void ScFiltersTest::testTdf100458() CPPUNIT_ASSERT(!rDoc.HasStringData(0, 0, 0)); } +void ScFiltersTest::testTdf100709XLSX() +{ + ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc("tdf100709.", FORMAT_XLSX); + CPPUNIT_ASSERT_MESSAGE("Failed to load tdf100709.xlsx", xDocSh.Is()); + + ScDocument& rDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell B52 should not be formatted with a $", OUString("218"), rDoc.GetString(1, 51, 0)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell A75 should not be formatted as a date", OUString("218"), rDoc.GetString(0, 74, 0)); + + xDocSh->DoClose(); +} + ScFiltersTest::ScFiltersTest() : ScBootstrapFixture( "sc/qa/unit/data" ) { |