| 56 | ! |
| 57 | |
| 58 | test_issue124_case1_01 |
| 59 | " |
| 60 | See https://swing.fit.cvut.cz/projects/stx-jv/ticket/124#comment:19 |
| 61 | " |
| 62 | |
| 63 | textView contents:'1234'. |
| 64 | textView setCursorCol:3. |
| 65 | textView selectToEndOfLine. |
| 66 | self assert:textView selectionAsString = '34'. |
| 67 | textView setClipboardText:'Smalltalk'. |
| 68 | textViewInteractor type:#Paste. |
| 69 | self assert:textView selectionAsString = 'Smalltalk'. |
| 70 | self assert:textView contents asString = ('12Smalltalk' , Character cr). |
| 71 | textViewInteractor type:#Undo. |
| 72 | self assert:textView contents asString = ('1234' , Character cr). |
| 73 | |
| 74 | "Created: / 17-03-2017 / 09:46:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
| 75 | "Modified (comment): / 04-05-2017 / 22:31:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
| 76 | ! |
| 77 | |
| 78 | test_issue124_case1_02 |
| 79 | " |
| 80 | See https://swing.fit.cvut.cz/projects/stx-jv/ticket/124#comment:19 |
| 81 | " |
| 82 | |
| 83 | textView contents:'1234'. |
| 84 | textView setCursorCol:3. |
| 85 | textView selectToEndOfLine. |
| 86 | self assert:textView selectionAsString = '34'. |
| 87 | textView setClipboardText:'1-LINEA |
| 88 | 2-LINEB |
| 89 | 3-LINEC |
| 90 | '. |
| 91 | textViewInteractor type:#Paste. |
| 92 | self assert:textView selectionAsString = '1-LINEA |
| 93 | 2-LINEB |
| 94 | 3-LINEC |
| 95 | '. |
| 96 | self assert:textView contents asString = ('121-LINEA |
| 97 | 2-LINEB |
| 98 | 3-LINEC |
| 99 | '). |
| 100 | textViewInteractor type:#Undo. |
| 101 | self assert:textView contents asString = ('1234' , Character cr). |
| 102 | |
| 103 | "Created: / 17-03-2017 / 09:48:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
| 104 | "Modified: / 17-03-2017 / 14:13:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
| 105 | "Modified (comment): / 04-05-2017 / 22:31:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
| 106 | ! |
| 107 | |
| 108 | test_issue124_case1_04 |
| 109 | " |
| 110 | See https://swing.fit.cvut.cz/projects/stx-jv/ticket/124#comment:19 |
| 111 | " |
| 112 | textViewInteractor type:'1234'. |
| 113 | self assert:textView contents asString = ('1234' , Character cr). |
| 114 | textViewInteractor type:#Undo. |
| 115 | self assert:textView contents asString = ('' , Character cr). |
| 116 | |
| 117 | "Created: / 17-03-2017 / 21:42:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
| 118 | "Modified (comment): / 04-05-2017 / 22:31:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
| 119 | ! |
| 120 | |
| 121 | test_issue124_case1_05 |
| 122 | " |
| 123 | See https://swing.fit.cvut.cz/projects/stx-jv/ticket/124#comment:19 |
| 124 | " |
| 125 | |
| 126 | textViewInteractor type:'1234'. |
| 127 | self assert:textView contents asString = ('1234' , Character cr). |
| 128 | textView setClipboardText:'Blah blag'. |
| 129 | textViewInteractor type:#Paste. |
| 130 | self assert:textView contents asString = ('1234Blah blag' , Character cr). |
| 131 | textViewInteractor type:#Undo. |
| 132 | self assert:textView contents asString = ('1234' , Character cr). |
| 133 | textViewInteractor type:#Undo. |
| 134 | self assert:textView contents asString = ('' , Character cr). |
| 135 | |
| 136 | "Created: / 17-03-2017 / 22:43:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
| 137 | "Modified (comment): / 04-05-2017 / 22:32:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |