sc/qa/unit/uicalc/data/tdf140151.ods |binary sc/qa/unit/uicalc/uicalc.cxx | 17 +++++++++++++++++ 2 files changed, 17 insertions(+)
New commits: commit 593ab5fbedb3de3c62039affd69f3dcd30f56d8f Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Mon Feb 8 11:15:04 2021 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue Feb 9 12:32:32 2021 +0100 tdf#140151: sc_uicalc: Add unittest For some reason, this test fails on Mac and Windows. I tried different approaches but all of them failed. See https://gerrit.libreoffice.org/c/core/+/110551 Since I don't know any other way of testing this bug, let test it at least on Linux Change-Id: I40e0afe6c850533e4a1db0fec30838a66f206512 Change-Id: Ide728ad41cf3952d1acf8fd98a64b72ee7c5cda6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110624 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sc/qa/unit/uicalc/data/tdf140151.ods b/sc/qa/unit/uicalc/data/tdf140151.ods new file mode 100644 index 000000000000..6c908b7596e3 Binary files /dev/null and b/sc/qa/unit/uicalc/data/tdf140151.ods differ diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx index f1d861518271..8c92824fe541 100644 --- a/sc/qa/unit/uicalc/uicalc.cxx +++ b/sc/qa/unit/uicalc/uicalc.cxx @@ -281,6 +281,23 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf92963) pMod->SetInputOptions(aInputOption); } +CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf140151) +{ +#if !defined(MACOSX) && !defined(_WIN32) //FIXME + ScModelObj* pModelObj = createDoc("tdf140151.ods"); + ScDocument* pDoc = pModelObj->GetDocument(); + CPPUNIT_ASSERT(pDoc); + + // Focus is already on the button + pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::RETURN); + pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::RETURN); + Scheduler::ProcessEventsToIdle(); + + // Without the fix in place, the current cursor position wouldn't have changed + lcl_AssertCurrentCursorPosition(1, 110); +#endif +} + CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf68290) { ScModelObj* pModelObj = createDoc("tdf68290.ods"); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits