summaryrefslogtreecommitdiffstats
path: root/tests/spinbox.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/spinbox.test')
-rw-r--r--tests/spinbox.test38
1 files changed, 28 insertions, 10 deletions
diff --git a/tests/spinbox.test b/tests/spinbox.test
index f9e11b6..ea29f60 100644
--- a/tests/spinbox.test
+++ b/tests/spinbox.test
@@ -2013,11 +2013,13 @@ test spinbox-5.7 {ConfigureSpinbox procedure} -setup {
} -body {
.e configure -font {Courier -12} -width 4 -xscrollcommand scroll
.e insert end "01234567890"
- update
+ set timeout [after 500 {set $scrollInfo "timeout"}]
+ vwait scrollInfo
.e configure -width 5
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
+ after cancel $timeout
} -result {0.000000 0.363636}
test spinbox-5.8 {ConfigureSpinbox procedure} -constraints {
@@ -2203,10 +2205,12 @@ test spinbox-7.1 {InsertChars procedure} -setup {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
.e insert 2 XXX
- update
+ set timeout [after 500 {set $scrollInfo "timeout"}]
+ vwait scrollInfo
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
+ after cancel $timeout
} -result {abXXXcde abXXXcde {0.000000 1.000000}}
test spinbox-7.2 {InsertChars procedure} -setup {
@@ -2218,10 +2222,12 @@ test spinbox-7.2 {InsertChars procedure} -setup {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
.e insert 500 XXX
- update
+ set timeout [after 500 {set $scrollInfo "timeout"}]
+ vwait scrollInfo
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
+ after cancel $timeout
} -result {abcdeXXX abcdeXXX {0.000000 1.000000}}
test spinbox-7.3 {InsertChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
@@ -2350,10 +2356,12 @@ test spinbox-8.1 {DeleteChars procedure} -setup {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
.e delete 2 4
- update
+ set timeout [after 500 {set $scrollInfo "timeout"}]
+ vwait scrollInfo
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
+ after cancel $timeout
} -result {abe abe {0.000000 1.000000}}
test spinbox-8.2 {DeleteChars procedure} -setup {
unset -nocomplain contents
@@ -2364,10 +2372,12 @@ test spinbox-8.2 {DeleteChars procedure} -setup {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
.e delete -2 2
- update
+ set timeout [after 500 {set $scrollInfo "timeout"}]
+ vwait scrollInfo
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
+ after cancel $timeout
} -result {cde cde {0.000000 1.000000}}
test spinbox-8.3 {DeleteChars procedure} -setup {
unset -nocomplain contents
@@ -2378,10 +2388,12 @@ test spinbox-8.3 {DeleteChars procedure} -setup {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
.e delete 3 1000
- update
+ set timeout [after 500 {set $scrollInfo "timeout"}]
+ vwait scrollInfo
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
+ after cancel $timeout
} -result {abc abc {0.000000 1.000000}}
test spinbox-8.4 {DeleteChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
@@ -3163,30 +3175,36 @@ test spinbox-17.1 {SpinboxUpdateScrollbar procedure} -body {
pack .e
.e delete 0 end
.e insert 0 123
- update
+ set timeout [after 500 {set $scrollInfo "timeout"}]
+ vwait scrollInfo
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
+ after cancel $timeout
} -result {0.000000 1.000000}
test spinbox-17.2 {SpinboxUpdateScrollbar procedure} -body {
spinbox .e -width 10 -xscrollcommand scroll -font {Courier -12}
pack .e
.e insert 0 0123456789abcdef
.e xview 3
- update
+ set timeout [after 500 {set $scrollInfo "timeout"}]
+ vwait scrollInfo
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
+ after cancel $timeout
} -result {0.187500 0.812500}
test spinbox-17.3 {SpinboxUpdateScrollbar procedure} -body {
spinbox .e -width 10 -xscrollcommand scroll -font {Courier -12}
pack .e
.e insert 0 abcdefghijklmnopqrs
.e xview 6
- update
+ set timeout [after 500 {set $scrollInfo "timeout"}]
+ vwait scrollInfo
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
+ after cancel $timeout
} -result {0.315789 0.842105}
test spinbox-17.4 {SpinboxUpdateScrollbar procedure} -setup {
proc bgerror msg {
@@ -3196,7 +3214,7 @@ test spinbox-17.4 {SpinboxUpdateScrollbar procedure} -setup {
} -body {
spinbox .e -width 5 -xscrollcommand thisisnotacommand
pack .e
- update
+ vwait x
list $x $errorInfo
} -cleanup {
destroy .e