summaryrefslogtreecommitdiffstats
path: root/tests/entry.test
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2015-12-10 17:21:07 (GMT)
committerfvogel <fvogelnew1@free.fr>2015-12-10 17:21:07 (GMT)
commit2f823dce353535fda34fff8883078e034675eec3 (patch)
tree737ac563660bf78cc4be9fa6469e30147a9fb64e /tests/entry.test
parent4ffa86ad7e16a62ad85e9fcaeeeeec8b054b66e3 (diff)
downloadtk-2f823dce353535fda34fff8883078e034675eec3.zip
tk-2f823dce353535fda34fff8883078e034675eec3.tar.gz
tk-2f823dce353535fda34fff8883078e034675eec3.tar.bz2
Fixed bug [1700065] - error in trace proc on textvariable doesn't trigger bgerror
Diffstat (limited to 'tests/entry.test')
-rw-r--r--tests/entry.test21
1 files changed, 17 insertions, 4 deletions
diff --git a/tests/entry.test b/tests/entry.test
index 27acfc1..da8f280 100644
--- a/tests/entry.test
+++ b/tests/entry.test
@@ -1621,13 +1621,26 @@ test entry-22.1 {lost namespaced textvar} {
namespace eval test { variable foo {a b} }
entry .e -textvariable ::test::foo
namespace delete test
- .e insert end "more stuff"
- .e delete 5 end
- catch {set ::test::foo} result
- list [.e get] [.e cget -textvar] $result
+ catch {.e insert end "more stuff"} result1
+ catch {.e delete 5 end} result2
+ catch {set ::test::foo} result3
+ list [.e get] [.e cget -textvar] $result1 $result2 $result3
} [list "a bmo" ::test::foo \
+ {can't set "::test::foo": parent namespace doesn't exist} \
+ {can't set "::test::foo": parent namespace doesn't exist} \
{can't read "::test::foo": no such variable}]
+test entry-23.1 {error in trace proc attached to the textvariable} {
+ destroy .e
+ trace variable myvar w traceit
+ proc traceit args {error "Intentional error here!"}
+ entry .e -textvariable myvar
+ catch {.e insert end mystring} result1
+ catch {.e delete 0} result2
+ list $result1 $result2
+} [list {can't set "myvar": Intentional error here!} \
+ {can't set "myvar": Intentional error here!}]
+
destroy .e
# XXX Still need to write tests for EntryBlinkProc, EntryFocusProc,