arcadia 0.12.2 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +25 -14
- data/conf/LC/en-UK.LANG +3 -1
- data/conf/arcadia.conf +10 -0
- data/conf/arcadia.res.rb +29 -1
- data/ext/ae-editor/ae-editor.rb +239 -48
- data/ext/ae-file-history/ae-file-history.conf +11 -1
- data/ext/ae-file-history/ae-file-history.rb +120 -2
- data/ext/ae-ruby-debug/ae-ruby-debug.rb +6 -5
- data/ext/ae-subprocess-inspector/ae-subprocess-inspector.rb +7 -3
- data/ext/ae-term/ae-term.rb +1 -1
- data/lib/a-commons.rb +72 -56
- data/lib/a-contracts.rb +23 -1
- data/lib/a-core.rb +136 -41
- data/lib/a-tkcommons.rb +127 -36
- data/tcl/fsdialog/fsdialog.tcl +2 -2
- data/tcl/ptwidgets-1.1.0/COPYRIGHT +10 -0
- data/tcl/ptwidgets-1.1.0/ChangeLog +194 -0
- data/tcl/ptwidgets-1.1.0/README +50 -0
- data/tcl/ptwidgets-1.1.0/common/stacktrace.tcl +29 -0
- data/tcl/ptwidgets-1.1.0/common/tokenframe.tcl +200 -0
- data/tcl/ptwidgets-1.1.0/doc/img/toggleswitch_off.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/toggleswitch_on.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/tokenentry.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/tokensearch_popup_example.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/tokensearch_popup_example2.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/wmarkentry.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/toggleswitch.html +402 -0
- data/tcl/ptwidgets-1.1.0/doc/tokenentry.html +1366 -0
- data/tcl/ptwidgets-1.1.0/doc/tokensearch.html +1549 -0
- data/tcl/ptwidgets-1.1.0/doc/wmarkentry.html +634 -0
- data/tcl/ptwidgets-1.1.0/library/toggleswitch.tcl +432 -0
- data/tcl/ptwidgets-1.1.0/library/tokenentry.tcl +2208 -0
- data/tcl/ptwidgets-1.1.0/library/tokensearch.tcl +2488 -0
- data/tcl/ptwidgets-1.1.0/library/wmarkentry.tcl +630 -0
- data/tcl/ptwidgets-1.1.0/pkgIndex.tcl +10 -0
- data/tcl/ptwidgets-1.1.0/test/Makefile +3 -0
- data/tcl/ptwidgets-1.1.0/test/run.tcl +3 -0
- data/tcl/ptwidgets-1.1.0/test/test.tcl +89 -0
- data/tcl/ptwidgets-1.1.0/test/toggleswitch.test +562 -0
- data/tcl/ptwidgets-1.1.0/test/tokenentry.test +1023 -0
- data/tcl/ptwidgets-1.1.0/test/tokensearch.test +1023 -0
- data/tcl/ptwidgets-1.1.0/test/wmarkentry.test +1325 -0
- data/tcl/themes/altTheme.tcl +101 -0
- data/tcl/themes/aquaTheme.tcl +59 -0
- data/tcl/themes/clamTheme.tcl +140 -0
- data/tcl/themes/classicTheme.tcl +108 -0
- data/tcl/themes/pkgIndex.tcl +3 -0
- data/tcl/themes/ttk.tcl +176 -0
- data/tcl/themes/vistaTheme.tcl +224 -0
- data/tcl/themes/winTheme.tcl +80 -0
- data/tcl/themes/xpTheme.tcl +65 -0
- data/tcl/tkfbox/folder.gif +0 -0
- data/tcl/tkfbox/textfile.gif +0 -0
- data/tcl/tkfbox/tkfbox.tcl +1 -0
- data/tcl/tkfbox/tkfbox.tcl~ +1 -0
- data/tcl/tkfbox/updir.xbm +1 -0
- metadata +43 -2
@@ -0,0 +1,1023 @@
|
|
1
|
+
lappend auto_path ".."
|
2
|
+
|
3
|
+
package require tokensearch
|
4
|
+
package require tcltest 2.2
|
5
|
+
|
6
|
+
proc setup {args} {
|
7
|
+
eval "tokensearch::tokensearch .ts $args"
|
8
|
+
pack .ts
|
9
|
+
}
|
10
|
+
|
11
|
+
proc cleanup {} {
|
12
|
+
destroy .ts
|
13
|
+
}
|
14
|
+
|
15
|
+
# Test Contraints
|
16
|
+
tcltest::testConstraint aqua [expr {[tk windowingsystem] eq "aqua"}]
|
17
|
+
tcltest::testConstraint x11 [expr {[tk windowingsystem] eq "x11"}]
|
18
|
+
|
19
|
+
# Skip list
|
20
|
+
tcltest::skip ts-bbox-0
|
21
|
+
|
22
|
+
# Tests
|
23
|
+
#---------------------------------
|
24
|
+
|
25
|
+
tcltest::test ts-configure-badoption {configure called with a bad option} \
|
26
|
+
-setup setup \
|
27
|
+
-body {
|
28
|
+
.ts configure -foobar
|
29
|
+
} -cleanup cleanup \
|
30
|
+
-returnCodes error -result "TokenSearch configuration option -foobar does not exist"
|
31
|
+
|
32
|
+
tcltest::test ts-configure-badoptionwithvalue {configure called with a bad option with a value} \
|
33
|
+
-setup setup \
|
34
|
+
-body {
|
35
|
+
.ts configure -foobar bubba
|
36
|
+
} -cleanup cleanup \
|
37
|
+
-returnCodes error -result "Illegal option given to the tokensearch configure command (-foobar)"
|
38
|
+
|
39
|
+
tcltest::test ts-cget {cget without an option} \
|
40
|
+
-setup setup \
|
41
|
+
-body {
|
42
|
+
.ts cget
|
43
|
+
} -cleanup cleanup \
|
44
|
+
-returnCodes error -result "Incorrect number of parameters given to the tokensearch cget command"
|
45
|
+
|
46
|
+
#---------------------------------
|
47
|
+
tcltest::test ts-background {setup -background returns correct result} \
|
48
|
+
-setup {
|
49
|
+
setup -background blue
|
50
|
+
} -body {
|
51
|
+
.ts cget -background
|
52
|
+
} -cleanup cleanup \
|
53
|
+
-result blue
|
54
|
+
|
55
|
+
tcltest::test ts-background-cget-bg {setup -background returns correct result} \
|
56
|
+
-setup {
|
57
|
+
setup -background blue
|
58
|
+
} -body {
|
59
|
+
.ts cget -bg
|
60
|
+
} -cleanup cleanup \
|
61
|
+
-result blue
|
62
|
+
|
63
|
+
tcltest::test ts-configure-background {configure -background returns correct result} \
|
64
|
+
-setup {
|
65
|
+
setup -background blue
|
66
|
+
} -body {
|
67
|
+
.ts configure -background
|
68
|
+
} -cleanup cleanup \
|
69
|
+
-result {-background background Background white blue}
|
70
|
+
|
71
|
+
tcltest::test ts-bg {setup -bg returns correct result} \
|
72
|
+
-setup {
|
73
|
+
setup -bg blue
|
74
|
+
} -body {
|
75
|
+
.ts cget -bg
|
76
|
+
} -cleanup cleanup \
|
77
|
+
-result blue
|
78
|
+
|
79
|
+
tcltest::test ts-bg-cget-background {setup -bg returns correct result} \
|
80
|
+
-setup {
|
81
|
+
setup -bg blue
|
82
|
+
} -body {
|
83
|
+
.ts cget -background
|
84
|
+
} -cleanup cleanup \
|
85
|
+
-result blue
|
86
|
+
|
87
|
+
tcltest::test ts-configure-bg {configure -bg returns correct result} \
|
88
|
+
-setup {
|
89
|
+
setup -bg blue
|
90
|
+
} -body {
|
91
|
+
.ts configure -bg
|
92
|
+
} -cleanup cleanup \
|
93
|
+
-result {-background background Background white blue}
|
94
|
+
|
95
|
+
tcltest::test ts-cget-background {cget -background returns the correct result} \
|
96
|
+
-setup setup \
|
97
|
+
-body {
|
98
|
+
.ts cget -background
|
99
|
+
} -cleanup cleanup \
|
100
|
+
-result white
|
101
|
+
|
102
|
+
tcltest::test ts-cget-bg {cget -bg returns the correct result} \
|
103
|
+
-setup setup \
|
104
|
+
-body {
|
105
|
+
.ts cget -bg
|
106
|
+
} -cleanup cleanup \
|
107
|
+
-result white
|
108
|
+
|
109
|
+
tcltest::test ts-configure-cget-background {configure/cget -background returns the correct result} \
|
110
|
+
-setup setup \
|
111
|
+
-body {
|
112
|
+
.ts configure -background blue
|
113
|
+
.ts cget -background
|
114
|
+
} -cleanup cleanup \
|
115
|
+
-result blue
|
116
|
+
|
117
|
+
tcltest::test ts-configure-cget-bg {configure/cget -bg returns correct result} \
|
118
|
+
-setup setup \
|
119
|
+
-body {
|
120
|
+
.ts configure -bg blue
|
121
|
+
.ts cget -bg
|
122
|
+
} -cleanup cleanup \
|
123
|
+
-result blue
|
124
|
+
|
125
|
+
tcltest::test ts-configure-background-cget-bg {configure/cget -background/-bg returns correct result} \
|
126
|
+
-setup setup \
|
127
|
+
-body {
|
128
|
+
.ts configure -background blue
|
129
|
+
.ts cget -bg
|
130
|
+
} -cleanup cleanup \
|
131
|
+
-result blue
|
132
|
+
|
133
|
+
tcltest::test ts-configure-bg-cget-background {configure/cget -bg/-background returns correct result} \
|
134
|
+
-setup setup \
|
135
|
+
-body {
|
136
|
+
.ts configure -bg blue
|
137
|
+
.ts cget -background
|
138
|
+
} -cleanup cleanup \
|
139
|
+
-result blue
|
140
|
+
|
141
|
+
#---------------------------------
|
142
|
+
tcltest::test ts-configure-borderwidth {configure -borderwidth returns correct result} \
|
143
|
+
-setup {
|
144
|
+
setup -borderwidth 5
|
145
|
+
} -body {
|
146
|
+
.ts configure -borderwidth
|
147
|
+
} -cleanup cleanup \
|
148
|
+
-match glob \
|
149
|
+
-result {-borderwidth borderWidth BorderWidth * 5}
|
150
|
+
|
151
|
+
tcltest::test ts-configure-bd {configure -bd returns correct result} \
|
152
|
+
-setup {
|
153
|
+
setup -bd 5
|
154
|
+
} -body {
|
155
|
+
.ts configure -bd
|
156
|
+
} -cleanup cleanup \
|
157
|
+
-match glob \
|
158
|
+
-result {-borderwidth borderWidth BorderWidth * 5}
|
159
|
+
|
160
|
+
tcltest::test ts-cget-borderwidth {cget -borderwidth returns the correct result} \
|
161
|
+
-setup {
|
162
|
+
setup -borderwidth 5
|
163
|
+
} -body {
|
164
|
+
.ts cget -borderwidth
|
165
|
+
} -cleanup cleanup \
|
166
|
+
-result 5
|
167
|
+
|
168
|
+
tcltest::test ts-cget-bd {cget -bd returns the correct result} \
|
169
|
+
-setup {
|
170
|
+
setup -bd 5
|
171
|
+
} -body {
|
172
|
+
.ts cget -bd
|
173
|
+
} -cleanup cleanup \
|
174
|
+
-result 5
|
175
|
+
|
176
|
+
tcltest::test ts-configure-cget-borderwidth {configure/cget -borderwidth returns the correct result} \
|
177
|
+
-setup setup \
|
178
|
+
-body {
|
179
|
+
.ts configure -borderwidth 2
|
180
|
+
.ts cget -borderwidth
|
181
|
+
} -cleanup cleanup \
|
182
|
+
-result 2
|
183
|
+
|
184
|
+
tcltest::test ts-configure-cget-bd {configure/cget -bd returns the correct result} \
|
185
|
+
-setup setup \
|
186
|
+
-body {
|
187
|
+
.ts configure -bd 2
|
188
|
+
.ts cget -bd
|
189
|
+
} -cleanup cleanup \
|
190
|
+
-result 2
|
191
|
+
|
192
|
+
tcltest::test ts-configure-borderwidth-cget-bd {configure/cget -borderwidth/-bd returns the correct result} \
|
193
|
+
-setup setup \
|
194
|
+
-body {
|
195
|
+
.ts configure -borderwidth 2
|
196
|
+
.ts cget -bd
|
197
|
+
} -cleanup cleanup \
|
198
|
+
-result 2
|
199
|
+
|
200
|
+
tcltest::test ts-configure-bd-cget-borderwidth {configure/cget -bd/-borderwidth returns the correct result} \
|
201
|
+
-setup setup \
|
202
|
+
-body {
|
203
|
+
.ts configure -bd 2
|
204
|
+
.ts cget -borderwidth
|
205
|
+
} -cleanup cleanup \
|
206
|
+
-result 2
|
207
|
+
|
208
|
+
#---------------------------------
|
209
|
+
tcltest::test ts-configure-exportselection {configure -exportselection returns correct result} \
|
210
|
+
-setup {
|
211
|
+
setup -exportselection 1
|
212
|
+
} -body {
|
213
|
+
.ts configure -exportselection
|
214
|
+
} -cleanup cleanup \
|
215
|
+
-result {-exportselection exportSelection ExportSelection 1 1}
|
216
|
+
|
217
|
+
tcltest::test ts-cget-exportselection {cget -exportselection returns correct result} \
|
218
|
+
-setup {
|
219
|
+
setup -exportselection 1
|
220
|
+
} -body {
|
221
|
+
.ts cget -exportselection
|
222
|
+
} -cleanup cleanup \
|
223
|
+
-result 1
|
224
|
+
|
225
|
+
tcltest::test ts-configure-cget-exportselection {configure/cget -exportselection returns correct result} \
|
226
|
+
-setup setup \
|
227
|
+
-body {
|
228
|
+
.ts configure -exportselection 0
|
229
|
+
.ts cget -exportselection
|
230
|
+
} -cleanup cleanup \
|
231
|
+
-result 0
|
232
|
+
|
233
|
+
#---------------------------------
|
234
|
+
tcltest::test ts-configure-font {configure -font returns correct result} \
|
235
|
+
-setup {
|
236
|
+
setup -font TkTextFont
|
237
|
+
} -body {
|
238
|
+
.ts configure -font
|
239
|
+
} -cleanup cleanup \
|
240
|
+
-result {-font font Font TkFixedFont TkTextFont}
|
241
|
+
|
242
|
+
tcltest::test ts-cget-font {cget -font returns correct result} \
|
243
|
+
-setup {
|
244
|
+
setup -font TkTextFont
|
245
|
+
} -body {
|
246
|
+
.ts cget -font
|
247
|
+
} -cleanup cleanup \
|
248
|
+
-result TkTextFont
|
249
|
+
|
250
|
+
tcltest::test ts-configure-cget-font {configure/cget -font returns correct result} \
|
251
|
+
-setup setup \
|
252
|
+
-body {
|
253
|
+
.ts configure -font TkFixedFont
|
254
|
+
.ts cget -font
|
255
|
+
} -cleanup cleanup \
|
256
|
+
-result TkFixedFont
|
257
|
+
|
258
|
+
#---------------------------------
|
259
|
+
tcltest::test ts-configure-foreground {configure -foreground returns correct result} \
|
260
|
+
-setup {
|
261
|
+
setup -foreground yellow
|
262
|
+
} -body {
|
263
|
+
.ts configure -foreground
|
264
|
+
} -cleanup cleanup \
|
265
|
+
-match regexp \
|
266
|
+
-result {-foreground foreground Foreground \S+ yellow}
|
267
|
+
|
268
|
+
tcltest::test ts-configure-fg {configure -fg returns correct result} \
|
269
|
+
-setup {
|
270
|
+
setup -fg yellow
|
271
|
+
} -body {
|
272
|
+
.ts configure -fg
|
273
|
+
} -cleanup cleanup \
|
274
|
+
-match regexp \
|
275
|
+
-result {-foreground foreground Foreground \S+ yellow}
|
276
|
+
|
277
|
+
tcltest::test ts-cget-foreground {cget -foreground returns correct result} \
|
278
|
+
-setup {
|
279
|
+
setup -foreground yellow
|
280
|
+
} -body {
|
281
|
+
.ts cget -foreground
|
282
|
+
} -cleanup cleanup \
|
283
|
+
-result yellow
|
284
|
+
|
285
|
+
tcltest::test ts-cget-fg {cget -fg returns correct result} \
|
286
|
+
-setup {
|
287
|
+
setup -fg yellow
|
288
|
+
} -body {
|
289
|
+
.ts cget -fg
|
290
|
+
} -cleanup cleanup \
|
291
|
+
-result yellow
|
292
|
+
|
293
|
+
tcltest::test ts-configure-cget-foreground {configure/cget -foreground returns correct result} \
|
294
|
+
-setup setup \
|
295
|
+
-body {
|
296
|
+
.ts configure -foreground red
|
297
|
+
.ts cget -foreground
|
298
|
+
} -cleanup cleanup \
|
299
|
+
-result red
|
300
|
+
|
301
|
+
tcltest::test ts-configure-cget-fg {configure/cget -fg returns correct result} \
|
302
|
+
-setup setup \
|
303
|
+
-body {
|
304
|
+
.ts configure -fg red
|
305
|
+
.ts cget -fg
|
306
|
+
} -cleanup cleanup \
|
307
|
+
-result red
|
308
|
+
|
309
|
+
tcltest::test ts-configure-foreground-cget-fg {configure/cget -foreground/-fg returns correct result} \
|
310
|
+
-setup setup \
|
311
|
+
-body {
|
312
|
+
.ts configure -foreground red
|
313
|
+
.ts cget -fg
|
314
|
+
} -cleanup cleanup \
|
315
|
+
-result red
|
316
|
+
|
317
|
+
tcltest::test ts-configure-fg-cget-foreground {configure/cget -fg/-foreground returns correct result} \
|
318
|
+
-setup setup \
|
319
|
+
-body {
|
320
|
+
.ts configure -fg red
|
321
|
+
.ts cget -foreground
|
322
|
+
} -cleanup cleanup \
|
323
|
+
-result red
|
324
|
+
|
325
|
+
#---------------------------------
|
326
|
+
tcltest::test ts-configure-highlightbackground {configure -highlightbackground returns correct result} \
|
327
|
+
-setup {
|
328
|
+
setup -highlightbackground yellow
|
329
|
+
} -body {
|
330
|
+
.ts configure -highlightbackground
|
331
|
+
} -cleanup cleanup \
|
332
|
+
-match regexp \
|
333
|
+
-result {-highlightbackground highlightBackground HighlightBackground \S+ yellow}
|
334
|
+
|
335
|
+
tcltest::test ts-cget-highlightbackground {cget -highlightbackground returns correct result} \
|
336
|
+
-setup {
|
337
|
+
setup -highlightbackground yellow
|
338
|
+
} -body {
|
339
|
+
.ts cget -highlightbackground
|
340
|
+
} -cleanup cleanup \
|
341
|
+
-result yellow
|
342
|
+
|
343
|
+
tcltest::test ts-configure-cget-highlightbackground {configure/cget -highlightbackground returns correct result} \
|
344
|
+
-setup setup \
|
345
|
+
-body {
|
346
|
+
.ts configure -highlightbackground yellow
|
347
|
+
.ts cget -highlightbackground
|
348
|
+
} -cleanup cleanup \
|
349
|
+
-result yellow
|
350
|
+
|
351
|
+
#---------------------------------
|
352
|
+
tcltest::test ts-configure-highlightcolor {configure -highlightcolor returns correct result} \
|
353
|
+
-setup {
|
354
|
+
setup -highlightcolor yellow
|
355
|
+
} -body {
|
356
|
+
.ts configure -highlightcolor
|
357
|
+
} -cleanup cleanup \
|
358
|
+
-match regexp \
|
359
|
+
-result {-highlightcolor highlightColor HighlightColor \S+ yellow}
|
360
|
+
|
361
|
+
tcltest::test ts-cget-highlightcolor {cget -highlightcolor returns correct result} \
|
362
|
+
-setup {
|
363
|
+
setup -highlightcolor yellow
|
364
|
+
} -body {
|
365
|
+
.ts cget -highlightcolor
|
366
|
+
} -cleanup cleanup \
|
367
|
+
-result yellow
|
368
|
+
|
369
|
+
tcltest::test ts-configure-cget-highlightcolor {configure/cget -highlightcolor returns correct result} \
|
370
|
+
-setup setup \
|
371
|
+
-body {
|
372
|
+
.ts configure -highlightcolor yellow
|
373
|
+
.ts cget -highlightcolor
|
374
|
+
} -cleanup cleanup \
|
375
|
+
-result yellow
|
376
|
+
|
377
|
+
#---------------------------------
|
378
|
+
tcltest::test ts-configure-highlightthickness {configure -highlightthickness returns correct result} \
|
379
|
+
-setup {
|
380
|
+
setup -highlightthickness 2
|
381
|
+
} -body {
|
382
|
+
.ts configure -highlightthickness
|
383
|
+
} -cleanup cleanup \
|
384
|
+
-match glob \
|
385
|
+
-result {-highlightthickness highlightThickness HighlightThickness * 2}
|
386
|
+
|
387
|
+
tcltest::test ts-cget-highlightthickness {cget -highlightthickness returns correct result} \
|
388
|
+
-setup {
|
389
|
+
setup -highlightthickness 2
|
390
|
+
} -body {
|
391
|
+
.ts cget -highlightthickness
|
392
|
+
} -cleanup cleanup \
|
393
|
+
-result 2
|
394
|
+
|
395
|
+
tcltest::test ts-configure-cget-highlightthickness {configure/cget -highlightthickness returns correct result} \
|
396
|
+
-setup setup \
|
397
|
+
-body {
|
398
|
+
.ts configure -highlightthickness 5
|
399
|
+
.ts cget -highlightthickness
|
400
|
+
} -cleanup cleanup \
|
401
|
+
-result 5
|
402
|
+
|
403
|
+
#---------------------------------
|
404
|
+
tcltest::test ts-configure-insertbackground {configure -insertbackground returns correct result} \
|
405
|
+
-setup {
|
406
|
+
setup -insertbackground yellow
|
407
|
+
} -body {
|
408
|
+
.ts configure -insertbackground
|
409
|
+
} -cleanup cleanup \
|
410
|
+
-match regexp \
|
411
|
+
-result {-insertbackground insertBackground InsertBackground \S+ yellow}
|
412
|
+
|
413
|
+
tcltest::test ts-cget-insertbackground {cget -insertbackground returns correct result} \
|
414
|
+
-setup {
|
415
|
+
setup -insertbackground yellow
|
416
|
+
} -body {
|
417
|
+
.ts cget -insertbackground
|
418
|
+
} -cleanup cleanup \
|
419
|
+
-result yellow
|
420
|
+
|
421
|
+
tcltest::test ts-configure-cget-insertbackground {configure/cget -insertbackground returns correct result} \
|
422
|
+
-setup setup \
|
423
|
+
-body {
|
424
|
+
.ts configure -insertbackground yellow
|
425
|
+
.ts cget -insertbackground
|
426
|
+
} -cleanup cleanup \
|
427
|
+
-result yellow
|
428
|
+
|
429
|
+
#---------------------------------
|
430
|
+
tcltest::test ts-configure-insertborderwidth {configure -insertborderwidth returns correct result} \
|
431
|
+
-setup {
|
432
|
+
setup -insertborderwidth 0
|
433
|
+
} -body {
|
434
|
+
.ts configure -insertborderwidth
|
435
|
+
} -cleanup cleanup \
|
436
|
+
-match glob \
|
437
|
+
-result {-insertborderwidth insertBorderWidth InsertBorderWidth * 0}
|
438
|
+
|
439
|
+
tcltest::test ts-cget-insertborderwidth {cget -insertborderwidth returns correct result} \
|
440
|
+
-setup {
|
441
|
+
setup -insertborderwidth 0
|
442
|
+
} -body {
|
443
|
+
.ts cget -insertborderwidth
|
444
|
+
} -cleanup cleanup \
|
445
|
+
-result 0
|
446
|
+
|
447
|
+
tcltest::test ts-configure-cget-insertborderwidth {configure/cget -insertborderwidth returns correct result} \
|
448
|
+
-setup setup \
|
449
|
+
-body {
|
450
|
+
.ts configure -insertborderwidth 0
|
451
|
+
.ts cget -insertborderwidth
|
452
|
+
} -cleanup cleanup \
|
453
|
+
-result 0
|
454
|
+
|
455
|
+
#---------------------------------
|
456
|
+
tcltest::test ts-configure-insertofftime {configure -insertofftime returns correct result} \
|
457
|
+
-setup {
|
458
|
+
setup -insertofftime 500
|
459
|
+
} -body {
|
460
|
+
.ts configure -insertofftime
|
461
|
+
} -cleanup cleanup \
|
462
|
+
-match regexp \
|
463
|
+
-result {-insertofftime insertOffTime InsertOffTime \d+ 500}
|
464
|
+
|
465
|
+
tcltest::test ts-cget-insertofftime {cget -insertofftime returns correct result} \
|
466
|
+
-setup {
|
467
|
+
setup -insertofftime 500
|
468
|
+
} -body {
|
469
|
+
.ts cget -insertofftime
|
470
|
+
} -cleanup cleanup \
|
471
|
+
-result 500
|
472
|
+
|
473
|
+
tcltest::test ts-configure-cget-insertofftime {configure/cget -insertofftime returns correct result} \
|
474
|
+
-setup setup \
|
475
|
+
-body {
|
476
|
+
.ts configure -insertofftime 600
|
477
|
+
.ts cget -insertofftime
|
478
|
+
} -cleanup cleanup \
|
479
|
+
-result 600
|
480
|
+
|
481
|
+
#---------------------------------
|
482
|
+
tcltest::test ts-configure-insertontime {configure -insertontime returns correct result} \
|
483
|
+
-setup {
|
484
|
+
setup -insertontime 500
|
485
|
+
} -body {
|
486
|
+
.ts configure -insertontime
|
487
|
+
} -cleanup cleanup \
|
488
|
+
-match regexp \
|
489
|
+
-result {-insertontime insertOnTime InsertOnTime \d+ 500}
|
490
|
+
|
491
|
+
tcltest::test ts-cget-insertontime {cget -insertontime returns correct result} \
|
492
|
+
-setup {
|
493
|
+
setup -insertontime 500
|
494
|
+
} -body {
|
495
|
+
.ts cget -insertontime
|
496
|
+
} -cleanup cleanup \
|
497
|
+
-result 500
|
498
|
+
|
499
|
+
tcltest::test ts-configure-cget-insertontime {configure/cget -insertontime returns correct result} \
|
500
|
+
-setup setup \
|
501
|
+
-body {
|
502
|
+
.ts configure -insertontime 1000
|
503
|
+
.ts cget -insertontime
|
504
|
+
} -cleanup cleanup \
|
505
|
+
-result 1000
|
506
|
+
|
507
|
+
#---------------------------------
|
508
|
+
tcltest::test ts-configure-insertwidth {configure -insertwidth returns correct result} \
|
509
|
+
-setup {
|
510
|
+
setup -insertwidth 5
|
511
|
+
} -body {
|
512
|
+
.ts configure -insertwidth
|
513
|
+
} -cleanup cleanup \
|
514
|
+
-match glob \
|
515
|
+
-result {-insertwidth insertWidth InsertWidth * 5}
|
516
|
+
|
517
|
+
tcltest::test ts-cget-insertwidth {cget -insertwidth returns correct result} \
|
518
|
+
-setup {
|
519
|
+
setup -insertwidth 5
|
520
|
+
} -body {
|
521
|
+
.ts cget -insertwidth
|
522
|
+
} -cleanup cleanup \
|
523
|
+
-result 5
|
524
|
+
|
525
|
+
tcltest::test ts-configure-cget-insertwidth {configure/cget -insertwidth returns correct result} \
|
526
|
+
-setup setup \
|
527
|
+
-body {
|
528
|
+
.ts configure -insertwidth 10
|
529
|
+
.ts cget -insertwidth
|
530
|
+
} -cleanup cleanup \
|
531
|
+
-result 10
|
532
|
+
|
533
|
+
#---------------------------------
|
534
|
+
tcltest::test ts-configure-relief {configure -relief returns correct result} \
|
535
|
+
-setup {
|
536
|
+
setup -relief flat
|
537
|
+
} -body {
|
538
|
+
.ts configure -relief
|
539
|
+
} -cleanup cleanup \
|
540
|
+
-match regexp \
|
541
|
+
-result {-relief relief Relief \S+ flat}
|
542
|
+
|
543
|
+
tcltest::test ts-cget-relief {cget -relief returns correct result} \
|
544
|
+
-setup {
|
545
|
+
setup -relief flat
|
546
|
+
} -body {
|
547
|
+
.ts cget -relief
|
548
|
+
} -cleanup cleanup \
|
549
|
+
-result flat
|
550
|
+
|
551
|
+
tcltest::test ts-configure-cget-relief {configure/cget -relief returns correct result} \
|
552
|
+
-setup setup \
|
553
|
+
-body {
|
554
|
+
.ts configure -relief ridge
|
555
|
+
.ts cget -relief
|
556
|
+
} -cleanup cleanup \
|
557
|
+
-result ridge
|
558
|
+
|
559
|
+
#---------------------------------
|
560
|
+
tcltest::test ts-configure-selectbackground {configure -selectbackground returns correct result} \
|
561
|
+
-setup {
|
562
|
+
setup -selectbackground yellow
|
563
|
+
} -body {
|
564
|
+
.ts configure -selectbackground
|
565
|
+
} -cleanup cleanup \
|
566
|
+
-match regexp \
|
567
|
+
-result {-selectbackground selectBackground Background \S+ yellow}
|
568
|
+
|
569
|
+
tcltest::test ts-cget-selectbackground {cget -selectbackground returns correct result} \
|
570
|
+
-setup {
|
571
|
+
setup -selectbackground yellow
|
572
|
+
} -body {
|
573
|
+
.ts cget -selectbackground
|
574
|
+
} -cleanup cleanup \
|
575
|
+
-result yellow
|
576
|
+
|
577
|
+
tcltest::test ts-configure-cget-selectbackground {configure/cget -selectbackground returns correct result} \
|
578
|
+
-setup setup \
|
579
|
+
-body {
|
580
|
+
.ts configure -selectbackground yellow
|
581
|
+
.ts cget -selectbackground
|
582
|
+
} -cleanup cleanup \
|
583
|
+
-result yellow
|
584
|
+
|
585
|
+
#---------------------------------
|
586
|
+
tcltest::test ts-configure-selectborderwidth {configure -selectborderwidth returns correct result} \
|
587
|
+
-setup {
|
588
|
+
setup -selectborderwidth 5
|
589
|
+
} -body {
|
590
|
+
.ts configure -selectborderwidth
|
591
|
+
} -cleanup cleanup \
|
592
|
+
-match glob \
|
593
|
+
-result {-selectborderwidth selectBorderWidth BorderWidth * 5}
|
594
|
+
|
595
|
+
tcltest::test ts-cget-selectborderwidth {cget -selectborderwidth returns correct result} \
|
596
|
+
-setup {
|
597
|
+
setup -selectborderwidth 5
|
598
|
+
} -body {
|
599
|
+
.ts cget -selectborderwidth
|
600
|
+
} -cleanup cleanup \
|
601
|
+
-result 5
|
602
|
+
|
603
|
+
tcltest::test ts-configure-cget-selectborderwidth {configure/cget -selectborderwidth returns correct result} \
|
604
|
+
-setup setup \
|
605
|
+
-body {
|
606
|
+
.ts configure -selectborderwidth 1
|
607
|
+
.ts cget -selectborderwidth
|
608
|
+
} -cleanup cleanup \
|
609
|
+
-result 1
|
610
|
+
|
611
|
+
#---------------------------------
|
612
|
+
tcltest::test ts-configure-selectforeground {configure -selectforeground returns correct result} \
|
613
|
+
-setup {
|
614
|
+
setup -selectforeground yellow
|
615
|
+
} -body {
|
616
|
+
.ts configure -selectforeground
|
617
|
+
} -cleanup cleanup \
|
618
|
+
-match regexp \
|
619
|
+
-result {-selectforeground selectForeground Foreground \S+ yellow}
|
620
|
+
|
621
|
+
tcltest::test ts-cget-selectforeground {cget -selectforeground returns correct result} \
|
622
|
+
-setup {
|
623
|
+
setup -selectforeground yellow
|
624
|
+
} -body {
|
625
|
+
.ts cget -selectforeground
|
626
|
+
} -cleanup cleanup \
|
627
|
+
-result yellow
|
628
|
+
|
629
|
+
tcltest::test ts-configure-cget-selectforeground {configure/cget -selectforeground returns correct result} \
|
630
|
+
-setup setup \
|
631
|
+
-body {
|
632
|
+
.ts configure -selectforeground yellow
|
633
|
+
.ts cget -selectforeground
|
634
|
+
} -cleanup cleanup \
|
635
|
+
-result yellow
|
636
|
+
|
637
|
+
#---------------------------------
|
638
|
+
tcltest::test ts-configure-state {configure -state returns correct result} \
|
639
|
+
-setup {
|
640
|
+
setup -state disabled
|
641
|
+
} -body {
|
642
|
+
.ts configure -state
|
643
|
+
} -cleanup cleanup \
|
644
|
+
-result {-state state State normal disabled}
|
645
|
+
|
646
|
+
tcltest::test ts-cget-state {cget -state returns correct result} \
|
647
|
+
-setup setup \
|
648
|
+
-body {
|
649
|
+
.ts cget -state
|
650
|
+
} -cleanup cleanup \
|
651
|
+
-result normal
|
652
|
+
|
653
|
+
tcltest::test ts-configure-cget-state {configure/cget -state returns correct result} \
|
654
|
+
-setup setup \
|
655
|
+
-body {
|
656
|
+
.ts configure -state disabled
|
657
|
+
.ts cget -state
|
658
|
+
} -cleanup cleanup \
|
659
|
+
-result disabled
|
660
|
+
|
661
|
+
#---------------------------------
|
662
|
+
tcltest::test ts-configure-takefocus {configure -takefocus returns correct result} \
|
663
|
+
-setup setup \
|
664
|
+
-body {
|
665
|
+
.ts configure -takefocus
|
666
|
+
} -cleanup cleanup \
|
667
|
+
-result {-takefocus takeFocus TakeFocus 1 1}
|
668
|
+
|
669
|
+
tcltest::test ts-cget-takefocus {cget -takefocus returns correct result} \
|
670
|
+
-setup setup \
|
671
|
+
-body {
|
672
|
+
.ts cget -takefocus
|
673
|
+
} -cleanup cleanup \
|
674
|
+
-result 1
|
675
|
+
|
676
|
+
tcltest::test ts-configure-cget-takefocus {configure/cget -takefocsu returns correct result} \
|
677
|
+
-setup setup \
|
678
|
+
-body {
|
679
|
+
.ts configure -takefocus 0
|
680
|
+
.ts cget -takefocus
|
681
|
+
} -cleanup cleanup \
|
682
|
+
-result 0
|
683
|
+
|
684
|
+
#---------------------------------
|
685
|
+
tcltest::test ts-configure-watermark {configure -watermark returns correct result} \
|
686
|
+
-setup setup \
|
687
|
+
-body {
|
688
|
+
.ts configure -watermark
|
689
|
+
} -cleanup cleanup \
|
690
|
+
-result {-watermark watermark Watermark {} {}}
|
691
|
+
|
692
|
+
tcltest::test ts-cget-watermark {cget -watermark returns correct result} \
|
693
|
+
-setup setup \
|
694
|
+
-body {
|
695
|
+
.ts cget -watermark
|
696
|
+
} -cleanup cleanup \
|
697
|
+
-result ""
|
698
|
+
|
699
|
+
tcltest::test ts-configure-cget-watermark {configure/cget -watermark returns correct result} \
|
700
|
+
-setup setup \
|
701
|
+
-body {
|
702
|
+
.ts configure -watermark "Enter string"
|
703
|
+
.ts cget -watermark
|
704
|
+
} -cleanup cleanup \
|
705
|
+
-result "Enter string"
|
706
|
+
|
707
|
+
tcltest::test ts-no-watermark {verify that no watermark exists in the entry field when -watermark is empty} \
|
708
|
+
-setup setup \
|
709
|
+
-body {
|
710
|
+
.ts configure -watermark ""
|
711
|
+
string trim [.ts.txt get 1.0 end]
|
712
|
+
} -cleanup cleanup \
|
713
|
+
-result ""
|
714
|
+
|
715
|
+
tcltest::test ts-watermark {verify that a watermark exists in the entry field when -watermark is non-empty} \
|
716
|
+
-setup setup \
|
717
|
+
-body {
|
718
|
+
.ts configure -watermark "Enter string"
|
719
|
+
string trim [.ts.txt get 1.0 end]
|
720
|
+
} -cleanup cleanup \
|
721
|
+
-result "Enter string"
|
722
|
+
|
723
|
+
tcltest::test ts-watermark-removed {verify that the watermark is removed when text is inserted into the widget} \
|
724
|
+
-setup setup \
|
725
|
+
-body {
|
726
|
+
.ts configure -watermark "Enter string"
|
727
|
+
.ts insert end "foobar"
|
728
|
+
string trim [.ts.txt get 1.0 end]
|
729
|
+
} -cleanup cleanup \
|
730
|
+
-result "foobar"
|
731
|
+
|
732
|
+
#---------------------------------
|
733
|
+
tcltest::test ts-configure-watermarkforeground {configure -watermarkforeground returns correct result} \
|
734
|
+
-setup setup \
|
735
|
+
-body {
|
736
|
+
.ts configure -watermarkforeground
|
737
|
+
} -cleanup cleanup \
|
738
|
+
-result {-watermarkforeground watermarkForeground Foreground {light gray} {light gray}}
|
739
|
+
|
740
|
+
tcltest::test ts-cget-watermarkforeground {cget -watermarkforeground returns correct result} \
|
741
|
+
-setup setup \
|
742
|
+
-body {
|
743
|
+
.ts cget -watermarkforeground
|
744
|
+
} -cleanup cleanup \
|
745
|
+
-result "light gray"
|
746
|
+
|
747
|
+
tcltest::test ts-configure-cget-watermarkforeground {configure/cget -watermarkforeground returns correct result} \
|
748
|
+
-setup setup \
|
749
|
+
-body {
|
750
|
+
.ts configure -watermarkforeground orange
|
751
|
+
.ts cget -watermarkforeground
|
752
|
+
} -cleanup cleanup \
|
753
|
+
-result orange
|
754
|
+
|
755
|
+
tcltest::test ts-watermark-color-check {check that the color is the watercolor when the watermark is present} \
|
756
|
+
-setup setup \
|
757
|
+
-body {
|
758
|
+
.ts configure -watermark "Enter string" -watermarkforeground orange -foreground black
|
759
|
+
.ts.txt cget -foreground
|
760
|
+
} -cleanup cleanup \
|
761
|
+
-result orange
|
762
|
+
|
763
|
+
tcltest::test ts-watermark-removed-color-check {check that the color is the foreground color when the watermark is removed} \
|
764
|
+
-setup setup \
|
765
|
+
-body {
|
766
|
+
.ts configure -watermark "Enter string" -watermarkforeground orange -foreground black
|
767
|
+
.ts insert end "foobar"
|
768
|
+
.ts.txt cget -foreground
|
769
|
+
} -cleanup cleanup \
|
770
|
+
-match regexp \
|
771
|
+
-result {(black|Black|#000000)}
|
772
|
+
|
773
|
+
#---------------------------------
|
774
|
+
tcltest::test ts-configure-width {configure -width returns correct result} \
|
775
|
+
-setup {
|
776
|
+
setup -width 40
|
777
|
+
} -body {
|
778
|
+
.ts configure -width
|
779
|
+
} -cleanup cleanup \
|
780
|
+
-match regexp \
|
781
|
+
-result {-width width Width \d+ 40}
|
782
|
+
|
783
|
+
tcltest::test ts-cget-width {cget -width returns correct result} \
|
784
|
+
-setup {
|
785
|
+
setup -width 40
|
786
|
+
} -body {
|
787
|
+
.ts cget -width
|
788
|
+
} -cleanup cleanup \
|
789
|
+
-result 40
|
790
|
+
|
791
|
+
tcltest::test ts-configure-cget-width {configure/cget -width returns correct result} \
|
792
|
+
-setup setup \
|
793
|
+
-body {
|
794
|
+
.ts configure -width 50
|
795
|
+
.ts cget -width
|
796
|
+
} -cleanup cleanup \
|
797
|
+
-result 50
|
798
|
+
|
799
|
+
#---------------------------------
|
800
|
+
tcltest::test ts-configure-xscrollcommand {configure -xscrollcommand returns correct result} \
|
801
|
+
-setup setup \
|
802
|
+
-body {
|
803
|
+
.ts configure -xscrollcommand
|
804
|
+
} -cleanup cleanup \
|
805
|
+
-result {-xscrollcommand xScrollCommand ScrollCommand {} {}}
|
806
|
+
|
807
|
+
tcltest::test ts-cget-xscrollcommand {cget -xscrollcommand returns correct result} \
|
808
|
+
-setup setup \
|
809
|
+
-body {
|
810
|
+
.ts cget -xscrollcommand
|
811
|
+
} -cleanup cleanup \
|
812
|
+
-result ""
|
813
|
+
|
814
|
+
tcltest::test ts-configure-cget-xscrollcommand {configure/cget -xscrollcommand returns correct result} \
|
815
|
+
-setup setup \
|
816
|
+
-body {
|
817
|
+
.ts configure -xscrollcommand "foobar"
|
818
|
+
.ts cget -xscrollcommand
|
819
|
+
} -cleanup cleanup \
|
820
|
+
-result "foobar"
|
821
|
+
|
822
|
+
#---------------------------------
|
823
|
+
tcltest::test ts-bbox-0 {bbox returns correct result} \
|
824
|
+
-setup setup \
|
825
|
+
-body {
|
826
|
+
.ts insert end "foobar"
|
827
|
+
.ts bbox 0
|
828
|
+
} -cleanup cleanup \
|
829
|
+
-match regexp \
|
830
|
+
-result {\d+ -\d+ \d+ \d+}
|
831
|
+
|
832
|
+
#---------------------------------
|
833
|
+
tcltest::test ts-delete-0 {delete returns correct result} \
|
834
|
+
-setup setup \
|
835
|
+
-body {
|
836
|
+
.ts insert end "foobar"
|
837
|
+
.ts delete 0
|
838
|
+
.ts get
|
839
|
+
} -cleanup cleanup \
|
840
|
+
-result "oobar"
|
841
|
+
|
842
|
+
tcltest::test ts-delete-end {delete returns correct result} \
|
843
|
+
-setup setup \
|
844
|
+
-body {
|
845
|
+
.ts insert end "foobar"
|
846
|
+
.ts delete end
|
847
|
+
.ts get
|
848
|
+
} -cleanup cleanup \
|
849
|
+
-result "foobar"
|
850
|
+
|
851
|
+
tcltest::test ts-delete-less {delete returns correct result} \
|
852
|
+
-setup setup \
|
853
|
+
-body {
|
854
|
+
.ts insert end "foobar"
|
855
|
+
.ts delete end-1
|
856
|
+
.ts get
|
857
|
+
} -cleanup cleanup \
|
858
|
+
-result "fooba"
|
859
|
+
|
860
|
+
tcltest::test ts-delete-more {delete returns correct result} \
|
861
|
+
-setup setup \
|
862
|
+
-body {
|
863
|
+
.ts insert end "foobar"
|
864
|
+
.ts delete 10
|
865
|
+
.ts get
|
866
|
+
} -cleanup cleanup \
|
867
|
+
-result "foobar"
|
868
|
+
|
869
|
+
tcltest::test ts-delete-first-last {delete first/last returns correct result} \
|
870
|
+
-setup setup \
|
871
|
+
-body {
|
872
|
+
.ts insert end "foobar"
|
873
|
+
.ts delete 1 4
|
874
|
+
.ts get
|
875
|
+
} -cleanup cleanup \
|
876
|
+
-result "far"
|
877
|
+
|
878
|
+
tcltest::test ts-delete-all {delete all returns correct result} \
|
879
|
+
-setup setup \
|
880
|
+
-body {
|
881
|
+
.ts insert end "foobar"
|
882
|
+
.ts delete 0 end
|
883
|
+
.ts get
|
884
|
+
} -cleanup cleanup \
|
885
|
+
-result ""
|
886
|
+
|
887
|
+
tcltest::test ts-delete-watermark {delete returns correct result} \
|
888
|
+
-setup setup \
|
889
|
+
-body {
|
890
|
+
.ts configure -watermark "Enter string"
|
891
|
+
.ts delete 1 end
|
892
|
+
.ts get
|
893
|
+
} -cleanup cleanup \
|
894
|
+
-result ""
|
895
|
+
|
896
|
+
tcltest::test ts-delete-watermark-all {delete returns correct result} \
|
897
|
+
-setup setup \
|
898
|
+
-body {
|
899
|
+
.ts configure -watermark "Enter string"
|
900
|
+
.ts delete 0 end
|
901
|
+
.ts get
|
902
|
+
} -cleanup cleanup \
|
903
|
+
-result ""
|
904
|
+
|
905
|
+
#---------------------------------
|
906
|
+
tcltest::test ts-get-empty {get returns correct result} \
|
907
|
+
-setup setup \
|
908
|
+
-body {
|
909
|
+
.ts get
|
910
|
+
} -cleanup cleanup \
|
911
|
+
-result ""
|
912
|
+
|
913
|
+
tcltest::test ts-get-watermark-empty {get returns correct result} \
|
914
|
+
-setup setup \
|
915
|
+
-body {
|
916
|
+
.ts configure -watermark "Enter string"
|
917
|
+
.ts get
|
918
|
+
} -cleanup cleanup \
|
919
|
+
-result ""
|
920
|
+
|
921
|
+
tcltest::test ts-get {get returns correct result} \
|
922
|
+
-setup setup \
|
923
|
+
-body {
|
924
|
+
.ts insert end "foobar"
|
925
|
+
.ts get
|
926
|
+
} -cleanup cleanup \
|
927
|
+
-result "foobar"
|
928
|
+
|
929
|
+
tcltest::test ts-get-watermark {get returns correct result} \
|
930
|
+
-setup setup \
|
931
|
+
-body {
|
932
|
+
.ts configure -watermark "Enter string"
|
933
|
+
.ts insert end "foobar"
|
934
|
+
.ts get
|
935
|
+
} -cleanup cleanup \
|
936
|
+
-result "foobar"
|
937
|
+
|
938
|
+
#---------------------------------
|
939
|
+
tcltest::test ts-icursor-watermark-empty-1 {icursor returns correct result} \
|
940
|
+
-setup setup \
|
941
|
+
-body {
|
942
|
+
.ts configure -watermark "Empty string"
|
943
|
+
.ts icursor 1
|
944
|
+
.ts index insert
|
945
|
+
} -cleanup cleanup \
|
946
|
+
-result 0
|
947
|
+
|
948
|
+
tcltest::test ts-icursor-watermark-empty-end {icursor returns correct result} \
|
949
|
+
-setup setup \
|
950
|
+
-body {
|
951
|
+
.ts configure -watermark "Empty string"
|
952
|
+
.ts icursor end
|
953
|
+
.ts index insert
|
954
|
+
} -cleanup cleanup \
|
955
|
+
-result 0
|
956
|
+
|
957
|
+
tcltest::test ts-icursor-watermark-empty-less {icursor returns correct result} \
|
958
|
+
-setup setup \
|
959
|
+
-body {
|
960
|
+
.ts configure -watermark "Empty string"
|
961
|
+
.ts icursor -1
|
962
|
+
.ts index insert
|
963
|
+
} -cleanup cleanup \
|
964
|
+
-result 0
|
965
|
+
|
966
|
+
tcltest::test ts-icursor-1 {icursor returns correct result} \
|
967
|
+
-setup setup \
|
968
|
+
-body {
|
969
|
+
.ts insert end "foobar"
|
970
|
+
.ts icursor 1
|
971
|
+
.ts index insert
|
972
|
+
} -cleanup cleanup \
|
973
|
+
-result 1
|
974
|
+
|
975
|
+
tcltest::test ts-icursor-end {icursor returns correct result} \
|
976
|
+
-setup setup \
|
977
|
+
-body {
|
978
|
+
.ts insert end "foobar"
|
979
|
+
.ts icursor end
|
980
|
+
.ts index insert
|
981
|
+
} -cleanup cleanup \
|
982
|
+
-result 6
|
983
|
+
|
984
|
+
tcltest::test ts-icursor-less {icursor returns correct result} \
|
985
|
+
-setup setup \
|
986
|
+
-body {
|
987
|
+
.ts insert end "foobar"
|
988
|
+
.ts icursor -1
|
989
|
+
.ts index insert
|
990
|
+
} -cleanup cleanup \
|
991
|
+
-result 0
|
992
|
+
|
993
|
+
tcltest::test ts-icursor-more {icursor returns correct result} \
|
994
|
+
-setup setup \
|
995
|
+
-body {
|
996
|
+
.ts insert end "foobar"
|
997
|
+
.ts icursor 10
|
998
|
+
.ts index insert
|
999
|
+
} -cleanup cleanup \
|
1000
|
+
-result 6
|
1001
|
+
|
1002
|
+
#---------------------------------
|
1003
|
+
tcltest::test ts-index-1 {make sure the index of end is 0 when watermark is displayed} \
|
1004
|
+
-setup setup \
|
1005
|
+
-body {
|
1006
|
+
.ts configure -watermark "Enter string"
|
1007
|
+
.ts index end
|
1008
|
+
} -cleanup cleanup \
|
1009
|
+
-result 0
|
1010
|
+
|
1011
|
+
tcltest::test ts-index-2 {make sure the index is correct if the watermark is not displayed} \
|
1012
|
+
-setup setup \
|
1013
|
+
-body {
|
1014
|
+
.ts configure -watermark "Enter string"
|
1015
|
+
.ts insert end "foobar"
|
1016
|
+
.ts index end
|
1017
|
+
} -cleanup cleanup \
|
1018
|
+
-result 6
|
1019
|
+
|
1020
|
+
# Cleanup the tests
|
1021
|
+
tcltest::cleanupTests
|
1022
|
+
|
1023
|
+
|