summaryrefslogtreecommitdiffstats
path: root/tests/spinbox.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/spinbox.test')
-rw-r--r--tests/spinbox.test42
1 files changed, 30 insertions, 12 deletions
diff --git a/tests/spinbox.test b/tests/spinbox.test
index 28ebe68..2d03cf1 100644
--- a/tests/spinbox.test
+++ b/tests/spinbox.test
@@ -1773,7 +1773,7 @@ test spinbox-3.71 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
.e xview scroll 24
} -cleanup {
destroy .e
-} -returnCodes error -result {wrong # args: should be ".e xview scroll number units|pages"}
+} -returnCodes error -result {wrong # args: should be ".e xview scroll number pages|units"}
test spinbox-3.72 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
@@ -1850,7 +1850,7 @@ test spinbox-3.77 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
.e xview scroll 23 foobars
} -cleanup {
destroy .e
-} -returnCodes error -result {bad argument "foobars": must be units or pages}
+} -returnCodes error -result {bad argument "foobars": must be pages or units}
test spinbox-3.78 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
@@ -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 {
@@ -2218,10 +2220,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 {
@@ -2233,10 +2237,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
@@ -2365,10 +2371,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
@@ -2379,10 +2387,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
@@ -2393,10 +2403,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
@@ -3193,30 +3205,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 {
@@ -3226,7 +3244,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