summaryrefslogtreecommitdiffstats
path: root/tests/spinbox.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/spinbox.test')
-rw-r--r--tests/spinbox.test26
1 files changed, 24 insertions, 2 deletions
diff --git a/tests/spinbox.test b/tests/spinbox.test
index 430e176..68c6fae 100644
--- a/tests/spinbox.test
+++ b/tests/spinbox.test
@@ -1568,9 +1568,9 @@ test spinbox-22.3 {spinbox config, -from changes SF bug 559078} {
set val
} {6}
-test entry-23.1 {selection present while disabled, bug 637828} {
+test spinbox-23.1 {selection present while disabled, bug 637828} {
destroy .e
- entry .e
+ spinbox .e
.e insert end 0123456789
.e select from 3
.e select to 6
@@ -1583,6 +1583,28 @@ test entry-23.1 {selection present while disabled, bug 637828} {
} {1 1 345}
destroy .e
+
+test spinbox-24.1 {error in trace proc attached to the textvariable} {
+ destroy .s
+ trace variable myvar w traceit
+ proc traceit args {error "Intentional error here!"}
+ spinbox .s -textvariable myvar -from 1 -to 10
+ catch {.s set mystring} result1
+ catch {.s insert 0 mystring} result2
+ catch {.s delete 0} result3
+ catch {.s invoke buttonup} result4
+ list $result1 $result2 $result3 $result4
+} [list {can't set "myvar": Intentional error here!} \
+ {can't set "myvar": Intentional error here!} \
+ {can't set "myvar": Intentional error here!} \
+ {can't set "myvar": Intentional error here!}]
+
+test spinbox-25.1 {textvariable lives in a non-existing namespace} {
+ destroy .s
+ catch {spinbox .s -textvariable thisnsdoesntexist::myvar} result1
+ set result1
+} {can't trace "thisnsdoesntexist::myvar": parent namespace doesn't exist}
+
catch {unset ::e ::vVals}
##