sc/qa/unit/ucalc.cxx |   13 +++++++++++++
 1 file changed, 13 insertions(+)

New commits:
commit 1b7356e57fbf28a62f10476cebbd45ee369fde17
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Oct 12 20:04:48 2022 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Oct 12 21:05:34 2022 +0200

    tdf#151460: sc_ucalc: Add unittest
    
    Change-Id: Ib0c8d09da50a09b2715a946a1955eb5a09d83d62
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141269
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 18a7be1af068..7726a56f561d 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4717,6 +4717,19 @@ void Test::testAutoFill()
     // - Actual  : 6.00000000000001
     CPPUNIT_ASSERT_EQUAL( OUString("6"), m_pDoc->GetString( 0, 50, 0 ) );
 
+    // Clear column A for a new test.
+    clearRange(m_pDoc, ScRange(0,0,0,0,m_pDoc->MaxRow(),0));
+    m_pDoc->SetRowHidden(0, m_pDoc->MaxRow(), 0, false); // Show all rows.
+
+    m_pDoc->SetString( 0, 0, 0, "2022-10-01 00:00:00.000" );
+    m_pDoc->SetString( 0, 1, 0, "2022-10-01 01:00:00.000" );
+    m_pDoc->Fill( 0, 0, 0, 1, nullptr, aMarkData, 25, FILL_TO_BOTTOM, 
FILL_AUTO );
+
+    // tdf#151460: Without the fix in place, this test would have failed with
+    // - Expected: 2022-10-01 20:00:00.000
+    // - Actual  : 2022-10-01 19:59:59.999
+    CPPUNIT_ASSERT_EQUAL( OUString("2022-10-01 20:00:00.000"), 
m_pDoc->GetString( 0, 20, 0 ) );
+
     m_pDoc->DeleteTab(0);
 }
 

Reply via email to