summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/spinbox.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/spinbox.test b/tests/spinbox.test
index 0f41379..b8170c5 100644
--- a/tests/spinbox.test
+++ b/tests/spinbox.test
@@ -3775,6 +3775,22 @@ test spinbox-22.3 {spinbox config, -from changes SF bug 559078} -body {
destroy .e
} -result {6}
+test spinbox-23.1 {selection present while disabled, bug 637828} -body {
+ spinbox .e
+ .e insert end 0123456789
+ .e select from 3
+ .e select to 6
+ set out [.e selection present]
+ .e configure -state disabled
+# still return 1 when disabled, because 'selection get' will work,
+# but selection cannot be changed (new behavior since 8.4)
+ .e select to 9
+ lappend out [.e selection present] [selection get]
+} -cleanup {
+ destroy .e
+} -result {1 1 345}
+
+
# Collected comments about lacks from the test
# XXX Still need to write tests for SpinboxBlinkProc, SpinboxFocusProc,
# and SpinboxTextVarProc.