Issue #124, case 1: Added test for this case
Actual fix is in stx:libbasic, revision 3563e89f551b.
https://swing.fit.cvut.cz/projects/stx-jv/ticket/124#comment:19
--- a/tests/EditTextViewTests.st Fri Mar 17 09:13:53 2017 +0000
+++ b/tests/EditTextViewTests.st Thu May 04 22:34:08 2017 +0200
@@ -9,6 +9,7 @@
category:'Views-Text-Tests'
!
+
!EditTextViewTests methodsFor:'running'!
setUp
@@ -52,5 +53,94 @@
self assert: textView selectionAsString = 'is Smalltalk '.
"Created: / 24-02-2015 / 08:21:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_issue124_case1_01
+ "
+ See https://swing.fit.cvut.cz/projects/stx-jv/ticket/124#comment:19
+ "
+
+ textView contents:'1234'.
+ textView setCursorCol:3.
+ textView selectToEndOfLine.
+ self assert:textView selectionAsString = '34'.
+ textView setClipboardText:'Smalltalk'.
+ textViewInteractor type:#Paste.
+ self assert:textView selectionAsString = 'Smalltalk'.
+ self assert:textView contents asString = ('12Smalltalk' , Character cr).
+ textViewInteractor type:#Undo.
+ self assert:textView contents asString = ('1234' , Character cr).
+
+ "Created: / 17-03-2017 / 09:46:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 04-05-2017 / 22:31:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_issue124_case1_02
+ "
+ See https://swing.fit.cvut.cz/projects/stx-jv/ticket/124#comment:19
+ "
+
+ textView contents:'1234'.
+ textView setCursorCol:3.
+ textView selectToEndOfLine.
+ self assert:textView selectionAsString = '34'.
+ textView setClipboardText:'1-LINEA
+2-LINEB
+3-LINEC
+'.
+ textViewInteractor type:#Paste.
+ self assert:textView selectionAsString = '1-LINEA
+2-LINEB
+3-LINEC
+'.
+ self assert:textView contents asString = ('121-LINEA
+2-LINEB
+3-LINEC
+').
+ textViewInteractor type:#Undo.
+ self assert:textView contents asString = ('1234' , Character cr).
+
+ "Created: / 17-03-2017 / 09:48:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-03-2017 / 14:13:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 04-05-2017 / 22:31:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_issue124_case1_04
+ "
+ See https://swing.fit.cvut.cz/projects/stx-jv/ticket/124#comment:19
+ "
+ textViewInteractor type:'1234'.
+ self assert:textView contents asString = ('1234' , Character cr).
+ textViewInteractor type:#Undo.
+ self assert:textView contents asString = ('' , Character cr).
+
+ "Created: / 17-03-2017 / 21:42:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 04-05-2017 / 22:31:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_issue124_case1_05
+ "
+ See https://swing.fit.cvut.cz/projects/stx-jv/ticket/124#comment:19
+ "
+
+ textViewInteractor type:'1234'.
+ self assert:textView contents asString = ('1234' , Character cr).
+ textView setClipboardText:'Blah blag'.
+ textViewInteractor type:#Paste.
+ self assert:textView contents asString = ('1234Blah blag' , Character cr).
+ textViewInteractor type:#Undo.
+ self assert:textView contents asString = ('1234' , Character cr).
+ textViewInteractor type:#Undo.
+ self assert:textView contents asString = ('' , Character cr).
+
+ "Created: / 17-03-2017 / 22:43:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 04-05-2017 / 22:32:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!EditTextViewTests class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
+