tests/Tools__CodeView2Tests.st
author Jan Vrany <jan.vrany@labware.com>
Wed, 07 Sep 2022 15:27:34 +0100
branchjv
changeset 19640 9001c87bacbe
parent 18369 4ccc3b5d656d
permissions -rw-r--r--
Use `allTestSelectors includes:` instead of `isTestSelector:` ...as the latter is Smalltalk/X specific so overriding it won't work with portable code. Indeed, this is much slower for large classes. Will see.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18272
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
 COPYRIGHT (c) 2017 Jan Vrany
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
              All Rights Reserved
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
 hereby transferred.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
"
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
"{ Package: 'stx:libtool/tests' }"
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
"{ NameSpace: Tools }"
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
TestCase subclass:#CodeView2Tests
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
	instanceVariableNames:'preferences codeView textView textViewInteractor'
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
	classVariableNames:''
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
	poolDictionaries:''
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
	category:'Interface-CodeView-Tests'
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
!
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
!CodeView2Tests class methodsFor:'documentation'!
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
copyright
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
"
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
 COPYRIGHT (c) 2017 Jan Vrany
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
              All Rights Reserved
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
 This software is furnished under a license and may be used
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
 only in accordance with the terms of that license and with the
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
 be provided or otherwise made available to, or used by, any
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
 other person.  No title to or ownership of the software is
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
 hereby transferred.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
"
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    37
! !
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    39
!CodeView2Tests methodsFor:'running'!
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
setUp
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
    | topView |
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
    self skipIf: Screen current isNil description: 'No display connection'.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    46
    Smalltalk loadPackage: 'stx:goodies/sunit/ext/ui'.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    47
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    48
    preferences := UserPreferences new.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    49
    MessageTracer mock: #current  in: UserPreferences class do: [ preferences ].
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    50
    self assert: UserPreferences current == preferences.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    51
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    52
    topView := StandardSystemView new.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    53
    topView extent: 320 @ 200.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
    topView label: self printString.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
    codeView := CodeView2 origin: 0.0@0.0 extent: 1.0@1.0 in: topView.     
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    56
    textView := codeView textView.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    57
    textView setTabPositions: ListView tab4Positions.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    58
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    59
    textViewInteractor := textView interactor.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    60
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    61
    topView open.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    62
    topView waitUntilVisible.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    63
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    64
    "Created: / 23-07-2014 / 07:15:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    65
    "Modified: / 17-07-2018 / 12:22:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    66
!
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    67
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    68
tearDown
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    69
    textView topView destroy.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    70
    MessageTracer unmock: #current  in: UserPreferences class
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    71
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    72
    "Created: / 23-07-2014 / 07:17:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    73
    "Modified: / 12-10-2017 / 22:59:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    74
! !
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    75
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    76
!CodeView2Tests methodsFor:'tests'!
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    77
18368
3877b0e95a78 Fixed typo in test names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18272
diff changeset
    78
test_issue230_01a
18272
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    79
    "
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    80
     Test paste over selection
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    81
        1. Copy some code to clipboard
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    82
        2. Select word in an editor
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    83
        3. Paste
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    84
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    85
     Check, that selected code has been replaced by
18368
3877b0e95a78 Fixed typo in test names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18272
diff changeset
    86
     pasted text."
18272
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    87
    
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    88
    textView contents:'Here is some word.'.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    89
    textView 
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    90
        selectFromLine:1
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    91
        col:9
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    92
        toLine:1
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    93
        col:12.
18369
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
    94
    self assert:textView selection first equals: 'some'.
18272
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    95
    textView setClipboardText:'pasted'.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    96
    textViewInteractor type:#Paste.
18369
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
    97
    self assert:textView selection first equals: 'pasted'.
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
    98
    self assert:textView contents equals: 'Here is pasted word.
18272
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    99
'.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   100
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   101
    "Created: / 17-07-2018 / 09:28:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   102
    "Modified: / 17-07-2018 / 09:28:42 / jv"
18369
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
   103
    "Modified: / 29-08-2018 / 21:43:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
18272
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   104
!
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   105
18368
3877b0e95a78 Fixed typo in test names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18272
diff changeset
   106
test_issue230_01b
18272
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   107
    "
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   108
     Test paste over selection
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   109
        1. Copy some code to clipboard
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   110
        2. Select word in an editor using select-world
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   111
        3. Paste
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   112
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   113
     Check, that selected code has been replaced by
18368
3877b0e95a78 Fixed typo in test names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18272
diff changeset
   114
     pasted text."
18272
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   115
    
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   116
    textViewInteractor type:'Here is some word.'.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   117
    textView setCursorCol:10.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   118
    textViewInteractor type:#SelectWord.
18369
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
   119
    self assert:textView selection first equals: 'some'.
18272
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   120
    textView setClipboardText:'pasted'.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   121
    textViewInteractor type:#Paste.
18369
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
   122
    self assert:textView selection first equals: 'pasted'.
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
   123
    self assert:textView contents equals: 'Here is pasted word.
18272
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   124
'.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   125
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   126
    "Created: / 17-07-2018 / 09:37:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
18369
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
   127
    "Modified: / 29-08-2018 / 21:43:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
18272
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   128
!
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   129
18368
3877b0e95a78 Fixed typo in test names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18272
diff changeset
   130
test_issue230_01c
18272
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   131
    "
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   132
     Test paste over selection
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   133
        1. Copy some code to clipboard using select world, then copy.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   134
        2. Select word in an editor using select-world
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   135
        3. Paste
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   136
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   137
     Check, that selected code has been replaced by
18368
3877b0e95a78 Fixed typo in test names
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18272
diff changeset
   138
     pasted text."
18272
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   139
    
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   140
    textView contents:'Here is some word.'.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   141
    textView setCursorCol:10.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   142
    textViewInteractor type:#SelectWord.
18369
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
   143
    self assert:textView selection first equals: 'some'.
18272
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   144
    textViewInteractor type:#Copy.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   145
    textView setCursorCol:3.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   146
    textViewInteractor type:#SelectWord.
18369
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
   147
    self assert:textView selection first equals: 'Here'.
18272
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   148
    textViewInteractor type:#Paste.
18369
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
   149
    self assert:textView selection first equals: 'some'.
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
   150
    self assert:textView contents equals: 'some is some word.
18272
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   151
'.
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   152
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   153
    "Created: / 17-07-2018 / 10:16:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
18369
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
   154
    "Modified: / 29-08-2018 / 21:43:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
18272
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   155
! !
eef85526ca1f Issue #230: added tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   156
18369
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
   157
!CodeView2Tests class methodsFor:'documentation'!
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
   158
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
   159
version_HG
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
   160
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
   161
    ^ '$Changeset: <not expanded> $'
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
   162
! !
4ccc3b5d656d In tests use `self assert: a equals: b`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18368
diff changeset
   163