sc/qa/unit/data/ods/tdf109409.ods      |binary
 sc/qa/unit/subsequent_filters-test.cxx |   31 +++++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)

New commits:
commit da157e5e723cfa329b7f149c37c4c36c1444ca6f
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Sep 2 20:07:11 2020 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Sep 3 11:48:40 2020 +0200

    tdf#109409: sc_subsequent_filters_test: Add unittest
    
    Change-Id: I6208a3a99aeae1d6c2cb8a550af500ab7855d294
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101974
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/qa/unit/data/ods/tdf109409.ods 
b/sc/qa/unit/data/ods/tdf109409.ods
new file mode 100644
index 000000000000..2a0eea9c4605
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf109409.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index 01f2db7f7d9d..463944a61d4c 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -233,6 +233,7 @@ public:
     void testTdf134455();
     void testTdf119533();
     void testTdf127982();
+    void testTdf109409();
     void testTdf131424();
     void testTdf100709XLSX();
     void testTdf97598XLSX();
@@ -397,6 +398,7 @@ public:
     CPPUNIT_TEST(testTdf134455);
     CPPUNIT_TEST(testTdf119533);
     CPPUNIT_TEST(testTdf127982);
+    CPPUNIT_TEST(testTdf109409);
     CPPUNIT_TEST(testTdf131424);
     CPPUNIT_TEST(testTdf100709XLSX);
     CPPUNIT_TEST(testTdf97598XLSX);
@@ -3880,6 +3882,35 @@ void ScFiltersTest::testTdf127982()
     xDocSh->DoClose();
 }
 
+void ScFiltersTest::testTdf109409()
+{
+    ScDocShellRef xDocSh = loadDoc("tdf109409.", FORMAT_ODS);
+    CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
+    ScDocument& rDoc = xDocSh->GetDocument();
+
+    // TEXTJOIN
+    CPPUNIT_ASSERT_EQUAL(OUString("A1;B1;A2;B2;A3;B3"), 
rDoc.GetString(ScAddress(3,1,0)));
+    CPPUNIT_ASSERT_EQUAL(OUString("A1;B1;A2;B2;A3;B3"), 
rDoc.GetString(ScAddress(3,2,0)));
+    CPPUNIT_ASSERT_EQUAL(OUString("A1;A2;A3;B1;B2;B3"), 
rDoc.GetString(ScAddress(3,4,0)));
+
+    // Without the fix in place, it would have failed with
+    //- Expected: A1;B1;A2;B2;A3;B3
+    //- Actual  : A1;A2;A3;B1;B2;B3
+    CPPUNIT_ASSERT_EQUAL(OUString("A1;B1;A2;B2;A3;B3"), 
rDoc.GetString(ScAddress(3,5,0)));
+
+    // CONCAT
+    CPPUNIT_ASSERT_EQUAL(OUString("A1B1A2B2A3B3"), 
rDoc.GetString(ScAddress(6,1,0)));
+    CPPUNIT_ASSERT_EQUAL(OUString("A1B1A2B2A3B3"), 
rDoc.GetString(ScAddress(6,2,0)));
+    CPPUNIT_ASSERT_EQUAL(OUString("A1A2A3B1B2B3"), 
rDoc.GetString(ScAddress(6,4,0)));
+
+    // Without the fix in place, it would have failed with
+    //- Expected: A1B1A2B2A3B3
+    //- Actual  : A1A2A3B1B2B3
+    CPPUNIT_ASSERT_EQUAL(OUString("A1B1A2B2A3B3"), 
rDoc.GetString(ScAddress(6,5,0)));
+
+    xDocSh->DoClose();
+}
+
 void ScFiltersTest::testTdf131424()
 {
     ScDocShellRef xDocSh = loadDoc("tdf131424.", FORMAT_XLSX);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to