sw/qa/extras/uiwriter/uiwriter8.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 4c382515069d1ccf9ffc3f647ab3acc26c2aba6f
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Mon Mar 11 10:00:39 2024 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Mon Mar 11 12:57:06 2024 +0100

    tdf#160095: sw_uiwriter8: Add unittest
    
    Change-Id: Id7d35511fbbc6a0d11f521bff9ad7469ae068ec7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164649
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/qa/extras/uiwriter/uiwriter8.cxx 
b/sw/qa/extras/uiwriter/uiwriter8.cxx
index 21fb637e0157..278c593b754d 100644
--- a/sw/qa/extras/uiwriter/uiwriter8.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter8.cxx
@@ -1287,6 +1287,12 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf146356)
     // - Expected: Some Text
     // - Actual  : Table of Contents
     CPPUNIT_ASSERT_EQUAL(OUString("Some Text"), getParagraph(1)->getString());
+
+    // tdf#160095: Without the fix in place, this test would have crashed here
+    pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_MOD2 | 
awt::Key::RETURN);
+    Scheduler::ProcessEventsToIdle();
+
+    CPPUNIT_ASSERT_EQUAL(OUString("Some Text"), getParagraph(1)->getString());
 }
 
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf121546)

Reply via email to