sc/qa/unit/ucalc.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
New commits: commit e9697e315cd382ce14b5c8efc47a07aa06dea30c Author: Supriyo Paul <paulsupriyo6...@gmail.com> AuthorDate: Tue Mar 7 15:12:40 2023 +0530 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue Mar 7 18:16:32 2023 +0000 tdf#94079 sc_ucalc: Add unit test Change-Id: I2254d924acd05d2322068b7b8df229328dcf21f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148385 Tested-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index e3f257825e97..b9217b2b5e6e 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -5913,6 +5913,22 @@ CPPUNIT_TEST_FIXTURE(Test, testColumnFindEditCells) m_pDoc->DeleteTab(0); } +CPPUNIT_TEST_FIXTURE(Test, testTdf94079) +{ + CPPUNIT_ASSERT(m_pDoc->InsertTab (0, "Test")); + + m_pDoc->SetString(ScAddress(0,0,0), "=NOW()"); // A1 + m_pDoc->SetString(ScAddress(0,1,0), "=NETWORKDAYS(NOW();NOW()+6;A1)"); // A2 + double aValue = m_pDoc->GetValue(0,1,0); + CPPUNIT_ASSERT_EQUAL(4.0, aValue); + + clearRange(m_pDoc, ScAddress(0,0,0)); // A1 + m_pDoc->SetString(ScAddress(0,1,0), "=NETWORKDAYS(NOW();NOW()+6;A1)"); // A2 + aValue = m_pDoc->GetValue(0,1,0); + CPPUNIT_ASSERT_EQUAL(5.0, aValue); + + m_pDoc->DeleteTab(0); +} CPPUNIT_TEST_FIXTURE(Test, testSetFormula) {