SmallSense__SmalltalkEditSupportTests.st
author Stefan Vogel <sv@exept.de>
Mon, 04 Mar 2019 13:09:59 +0100
branchcvs_MAIN
changeset 1085 a22655fd60b5
parent 274 2cfcd8eb9761
child 374 e65bd2bf892a
permissions -rw-r--r--
#REFACTORING by stefan class: SmallSense::AbstractJavaCompletionEngineSimple changed: #guessTypeOfExpressionBefore:in: fixed shadowed var
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
Copyright (C) 2013-2014 Jan Vrany
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
This library is free software; you can redistribute it and/or
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
modify it under the terms of the GNU Lesser General Public
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
License as published by the Free Software Foundation; either
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
version 2.1 of the License. 
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
This library is distributed in the hope that it will be useful,
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
but WITHOUT ANY WARRANTY; without even the implied warranty of
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
Lesser General Public License for more details.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
You should have received a copy of the GNU Lesser General Public
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
License along with this library; if not, write to the Free Software
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
"
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
"{ Package: 'stx:goodies/smallsense' }"
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
"{ NameSpace: SmallSense }"
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
EditSupportTests subclass:#SmalltalkEditSupportTests
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
	instanceVariableNames:''
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
	classVariableNames:''
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
	poolDictionaries:''
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
	category:'SmallSense-Tests'
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
!
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
!SmalltalkEditSupportTests class methodsFor:'documentation'!
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
copyright
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
"
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
Copyright (C) 2013-2014 Jan Vrany
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    37
This library is free software; you can redistribute it and/or
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38
modify it under the terms of the GNU Lesser General Public
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    39
License as published by the Free Software Foundation; either
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
version 2.1 of the License. 
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
This library is distributed in the hope that it will be useful,
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
but WITHOUT ANY WARRANTY; without even the implied warranty of
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
Lesser General Public License for more details.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    46
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    47
You should have received a copy of the GNU Lesser General Public
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    48
License along with this library; if not, write to the Free Software
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    49
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    50
"
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    51
! !
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    52
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    53
!SmalltalkEditSupportTests methodsFor:'accessing-classes'!
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
editSupportClass
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    56
    "superclass SmallSense::EditSupportTests says that I am responsible to implement this method"
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    57
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    58
    ^ SmalltalkEditSupport
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    59
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    60
    "Created: / 23-07-2014 / 07:16:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    61
! !
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    62
274
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    63
!SmalltalkEditSupportTests methodsFor:'tests - completion'!
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    64
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    65
test_complete_if_unambiguous_01    
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    66
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    67
    UserPreferences current smallSenseCompleteIfUnambiguous: true.  
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    68
    codeView editedMethodOrClass: self class.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    69
    codeView contents:'editService'.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    70
    codeView setCursorCol: 12.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    71
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    72
    codeViewInteractor type: #(Return Tab).
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    73
    codeViewInteractor type: 't'.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    74
    Delay waitForMilliseconds: 250.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    75
    codeViewInteractor type: 'h'.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    76
    self assert: (codeView list at: 2) = '    thisContext'.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    77
    Delay waitForMilliseconds: 250.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    78
    codeViewInteractor type: 'isContext'.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    79
    self assert: (codeView list at: 2) = '    thisContext'.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    80
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    81
    "Created: / 23-07-2014 / 23:38:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    82
    "Modified: / 11-08-2014 / 14:58:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    83
!
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    84
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    85
test_complete_if_unambiguous_02
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    86
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    87
    UserPreferences current smallSenseCompleteIfUnambiguous: true.  
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    88
    codeView editedMethodOrClass: self class.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    89
    codeView contents:'editService'.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    90
    codeView setCursorCol: 12.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    91
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    92
    codeViewInteractor type: #(Return Tab).
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    93
    codeViewInteractor type: 't'.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    94
    Delay waitForMilliseconds: 250.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    95
    codeViewInteractor type: 'h'.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    96
    self assert: (codeView list at: 2) = '    thisContext'.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    97
    Delay waitForMilliseconds: 250.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    98
    codeViewInteractor type: 'is receiver'.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
    99
    self assert: (codeView list at: 2) = '    thisContext receiver'.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   100
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   101
    "Created: / 11-08-2014 / 15:00:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   102
!
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   103
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   104
test_complete_if_unambiguous_03
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   105
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   106
    UserPreferences current smallSenseCompleteIfUnambiguous: true.  
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   107
    codeView editedMethodOrClass: self class.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   108
    codeView contents:'editService'.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   109
    codeView setCursorCol: 12.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   110
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   111
    codeViewInteractor type: #(Return Tab).
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   112
    codeViewInteractor type: 't'.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   113
    Delay waitForMilliseconds: 250.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   114
    codeViewInteractor type: 'h'.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   115
    self assert: (codeView list at: 2) = '    thisContext'.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   116
    Delay waitForMilliseconds: 250.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   117
    codeViewInteractor type: 'isValue'.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   118
    self assert: (codeView list at: 2) = '    thisValue'.
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   119
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   120
    "Created: / 11-08-2014 / 15:01:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   121
! !
2cfcd8eb9761 Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 273
diff changeset
   122
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   123
!SmalltalkEditSupportTests methodsFor:'tests - indent-on-paste'!
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   124
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   125
test_indent_on_paste_01a
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   126
273
404662b42ddf Added AbstractTestCase which saves/restores preferences in setUp/tearDown...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 257
diff changeset
   127
    UserPreferences current smallSenseSmalltalkIndentOnPasteEnabled: true.
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   128
    codeView contents:'test
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   129
    Debug ifTrue:[ 
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   130
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   131
    ].
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   132
    self halt.'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   133
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   134
    codeView selectFromLine: 5 col: 5 toLine: 5 col: 14.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   135
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   136
    codeViewInteractor type: #Cut.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   137
    codeViewInteractor type: #(CursorUp CursorUp).
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   138
    codeViewInteractor type: #Paste.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   139
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   140
    self assert: (codeView list at: 3) = '        self halt.'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   141
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   142
    "Created: / 23-07-2014 / 09:46:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
273
404662b42ddf Added AbstractTestCase which saves/restores preferences in setUp/tearDown...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 257
diff changeset
   143
    "Modified: / 11-08-2014 / 14:26:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   144
!
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   145
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   146
test_indent_on_paste_01b
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   147
273
404662b42ddf Added AbstractTestCase which saves/restores preferences in setUp/tearDown...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 257
diff changeset
   148
    UserPreferences current smallSenseSmalltalkIndentOnPasteEnabled: true.
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   149
    codeView contents:'test
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   150
    Debug ifTrue:[ 
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   151
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   152
    ].
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   153
    self halt.'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   154
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   155
    codeView selectFromLine:5 col:1 toLine:6 col:0.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   156
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   157
    codeViewInteractor type: #Cut.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   158
    codeViewInteractor type: #(CursorUp CursorUp).
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   159
    codeViewInteractor type: #Paste.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   160
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   161
    self assert: (codeView list at: 3) = '        self halt.'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   162
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   163
    "Created: / 23-07-2014 / 09:47:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
273
404662b42ddf Added AbstractTestCase which saves/restores preferences in setUp/tearDown...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 257
diff changeset
   164
    "Modified: / 11-08-2014 / 14:26:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   165
!
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   166
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   167
test_indent_on_paste_02a
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   168
273
404662b42ddf Added AbstractTestCase which saves/restores preferences in setUp/tearDown...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 257
diff changeset
   169
    UserPreferences current smallSenseSmalltalkIndentOnPasteEnabled: true.
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   170
    codeView contents:'test
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   171
    Debug ifTrue:[ 
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   172
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   173
    ].
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   174
    param isNil ifTrue:[
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   175
        self halt.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   176
    ]'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   177
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   178
    codeView selectFromLine: 5 col: 5 toLine: 7 col: 5.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   179
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   180
    codeViewInteractor type: #Cut.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   181
    codeViewInteractor type: #(CursorUp CursorUp).
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   182
    codeViewInteractor type: #Paste.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   183
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   184
    self assert: (codeView list at: 3) = '        param isNil ifTrue:['.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   185
    self assert: (codeView list at: 4) = '            self halt.'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   186
    self assert: (codeView list at: 5) = '        ]'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   187
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   188
    "Created: / 23-07-2014 / 10:20:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
273
404662b42ddf Added AbstractTestCase which saves/restores preferences in setUp/tearDown...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 257
diff changeset
   189
    "Modified: / 11-08-2014 / 14:26:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   190
!
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   191
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   192
test_indent_on_paste_02b
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   193
273
404662b42ddf Added AbstractTestCase which saves/restores preferences in setUp/tearDown...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 257
diff changeset
   194
    UserPreferences current smallSenseSmalltalkIndentOnPasteEnabled: true.
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   195
    codeView contents:'test
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   196
    Debug ifTrue:[ 
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   197
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   198
    ].
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   199
    param isNil ifTrue:[
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   200
        self halt.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   201
    ]'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   202
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   203
    codeView selectFromLine: 5 col: 1 toLine: 8 col: 0.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   204
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   205
    codeViewInteractor type: #Cut.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   206
    codeViewInteractor type: #(CursorUp CursorUp).
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   207
    codeViewInteractor type: #Paste.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   208
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   209
    self assert: (codeView list at: 3) = '        param isNil ifTrue:['.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   210
    self assert: (codeView list at: 4) = '            self halt.'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   211
    self assert: (codeView list at: 5) = '        ]'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   212
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   213
    "Created: / 23-07-2014 / 10:20:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
273
404662b42ddf Added AbstractTestCase which saves/restores preferences in setUp/tearDown...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 257
diff changeset
   214
    "Modified: / 11-08-2014 / 14:26:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   215
!
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   216
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   217
test_indent_on_paste_03a
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   218
273
404662b42ddf Added AbstractTestCase which saves/restores preferences in setUp/tearDown...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 257
diff changeset
   219
    UserPreferences current smallSenseSmalltalkIndentOnPasteEnabled: true.
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   220
    codeView contents:'test
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   221
    Debug ifTrue:[ 
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   222
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   223
    ].
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   224
    param isNil ifTrue:[
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   225
        self halt.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   226
    ]'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   227
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   228
    codeView selectFromLine: 5 col: 5 toLine: 6 col: 18.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   229
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   230
    codeViewInteractor type: #Cut.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   231
    codeViewInteractor type: #(CursorUp CursorUp).
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   232
    codeViewInteractor type: #Paste.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   233
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   234
    self assert: (codeView list at: 3) = '        param isNil ifTrue:['.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   235
    self assert: (codeView list at: 4) = '            self halt.'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   236
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   237
    "Created: / 23-07-2014 / 23:28:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
273
404662b42ddf Added AbstractTestCase which saves/restores preferences in setUp/tearDown...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 257
diff changeset
   238
    "Modified: / 11-08-2014 / 14:26:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   239
!
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   240
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   241
test_indent_on_paste_03b
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   242
273
404662b42ddf Added AbstractTestCase which saves/restores preferences in setUp/tearDown...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 257
diff changeset
   243
    UserPreferences current smallSenseSmalltalkIndentOnPasteEnabled: true.
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   244
    codeView contents:'test
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   245
    Debug ifTrue:[ 
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   246
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   247
    ].
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   248
    param isNil ifTrue:[
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   249
        self halt.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   250
    ]'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   251
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   252
    codeView selectFromLine: 5 col: 1 toLine: 7 col: 0.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   253
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   254
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   255
    codeViewInteractor type: #Cut.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   256
    codeViewInteractor type: #(CursorUp CursorUp).
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   257
    codeViewInteractor type: #Paste.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   258
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   259
    self assert: (codeView list at: 3) = '        param isNil ifTrue:['.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   260
    self assert: (codeView list at: 4) = '            self halt.'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   261
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   262
    "Created: / 23-07-2014 / 23:28:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
273
404662b42ddf Added AbstractTestCase which saves/restores preferences in setUp/tearDown...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 257
diff changeset
   263
    "Modified: / 11-08-2014 / 14:26:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   264
!
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   265
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   266
test_indent_on_paste_04a
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   267
273
404662b42ddf Added AbstractTestCase which saves/restores preferences in setUp/tearDown...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 257
diff changeset
   268
    UserPreferences current smallSenseSmalltalkIndentOnPasteEnabled: true.
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   269
    codeView contents:'test
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   270
    Debug ifTrue:[ 
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   271
        Transcript showCR:''XXX''.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   272
    ].
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   273
    self halt.'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   274
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   275
    codeView selectFromLine: 5 col: 5 toLine: 5 col: 14.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   276
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   277
    codeViewInteractor type: #Cut.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   278
    codeViewInteractor type: #(CursorUp CursorUp).
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   279
    codeViewInteractor type: #Paste.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   280
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   281
    self assert: (codeView list at: 3) = '    self halt.    Transcript showCR:''XXX''.'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   282
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   283
    "Created: / 24-07-2014 / 10:18:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
273
404662b42ddf Added AbstractTestCase which saves/restores preferences in setUp/tearDown...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 257
diff changeset
   284
    "Modified: / 11-08-2014 / 14:26:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   285
!
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   286
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   287
test_indent_on_paste_04b
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   288
273
404662b42ddf Added AbstractTestCase which saves/restores preferences in setUp/tearDown...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 257
diff changeset
   289
    UserPreferences current smallSenseSmalltalkIndentOnPasteEnabled: true.
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   290
    codeView contents:'test
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   291
    Debug ifTrue:[ 
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   292
        Transcript showCR:''XXX''.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   293
    ].
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   294
    self halt.'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   295
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   296
    codeView selectFromLine: 5 col: 5 toLine: 6 col: 0.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   297
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   298
    codeViewInteractor type: #Cut.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   299
    codeViewInteractor type: #(CursorUp CursorUp).
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   300
    codeViewInteractor type: #Paste.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   301
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   302
    self assert: (codeView list at: 3) = '    self halt.'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   303
    self assert: (codeView list at: 4) = '    Transcript showCR:''XXX''.'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   304
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   305
    "Created: / 24-07-2014 / 10:21:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
273
404662b42ddf Added AbstractTestCase which saves/restores preferences in setUp/tearDown...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 257
diff changeset
   306
    "Modified: / 11-08-2014 / 14:26:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   307
!
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   308
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   309
test_indent_on_paste_04c
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   310
273
404662b42ddf Added AbstractTestCase which saves/restores preferences in setUp/tearDown...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 257
diff changeset
   311
    UserPreferences current smallSenseSmalltalkIndentOnPasteEnabled: true.
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   312
    codeView contents:'test
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   313
    Debug ifTrue:[ 
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   314
        Transcript showCR:''XXX''.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   315
    ].
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   316
    self halt.'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   317
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   318
    codeView selectFromLine: 5 col: 5 toLine: 6 col: 0.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   319
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   320
    codeViewInteractor type: #Cut.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   321
    codeViewInteractor type: #(CursorUp CursorUp CursorRight CursorRight CursorRight CursorRight).
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   322
    codeViewInteractor type: #Paste.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   323
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   324
    self assert: (codeView list at: 3) = '        self halt.'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   325
    self assert: (codeView list at: 4) = 'Transcript showCR:''XXX''.'.
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   326
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   327
    "Created: / 24-07-2014 / 10:22:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
273
404662b42ddf Added AbstractTestCase which saves/restores preferences in setUp/tearDown...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 257
diff changeset
   328
    "Modified: / 11-08-2014 / 14:26:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
257
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   329
! !
623cefc35e2e Fix for DNU when indent-on-paste is enabled.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   330