Add another test for the insertion point position after SetValue().
Verify that setting the value of a previously not empty control resets the insertion point to its beginning. See #10051. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -144,6 +144,9 @@ void TextEntryTestCase::InsertionPoint()
|
|||||||
entry->WriteText("-"); // should move it after the written text
|
entry->WriteText("-"); // should move it after the written text
|
||||||
CPPUNIT_ASSERT_EQUAL( 4, entry->GetLastPosition() );
|
CPPUNIT_ASSERT_EQUAL( 4, entry->GetLastPosition() );
|
||||||
CPPUNIT_ASSERT_EQUAL( 1, entry->GetInsertionPoint() );
|
CPPUNIT_ASSERT_EQUAL( 1, entry->GetInsertionPoint() );
|
||||||
|
|
||||||
|
entry->SetValue("something different"); // should still reset the caret
|
||||||
|
CPPUNIT_ASSERT_EQUAL( 0, entry->GetInsertionPoint() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEntryTestCase::Replace()
|
void TextEntryTestCase::Replace()
|
||||||
|
Reference in New Issue
Block a user