summaryrefslogtreecommitdiff
path: root/starmath/qa
diff options
context:
space:
mode:
Diffstat (limited to 'starmath/qa')
-rw-r--r--starmath/qa/cppunit/test_starmath.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx
index 09f9abd637fa..a6916bf521bf 100644
--- a/starmath/qa/cppunit/test_starmath.cxx
+++ b/starmath/qa/cppunit/test_starmath.cxx
@@ -133,6 +133,14 @@ void Test::editMarker()
m_pEditWindow->Delete();
m_pEditWindow->InsertText("b");
+ // tdf#106116: should be safe i.e. do nothing
+ m_pEditWindow->SelPrevMark();
+ auto aSelection = m_pEditWindow->GetSelection();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aSelection.nStartPara);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(9), aSelection.nStartPos);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aSelection.nEndPara);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(9), aSelection.nEndPos);
+
m_pEditWindow->Flush();
OUString sFinalText = m_pEditWindow->GetText();
CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be a under b under c", sTargetText, sFinalText);