diff options
author | fvogel <fvogelnew1@free.fr> | 2015-12-10 17:21:07 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2015-12-10 17:21:07 (GMT) |
commit | 2f823dce353535fda34fff8883078e034675eec3 (patch) | |
tree | 737ac563660bf78cc4be9fa6469e30147a9fb64e /tests | |
parent | 4ffa86ad7e16a62ad85e9fcaeeeeec8b054b66e3 (diff) | |
download | tk-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')
-rw-r--r-- | tests/entry.test | 21 | ||||
-rw-r--r-- | tests/spinbox.test | 15 |
2 files changed, 32 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, diff --git a/tests/spinbox.test b/tests/spinbox.test index 88e4d44..e8f027b 100644 --- a/tests/spinbox.test +++ b/tests/spinbox.test @@ -1568,6 +1568,21 @@ test spinbox-22.3 {spinbox config, -from changes SF bug 559078} { set val } {6} +test spinbox-23.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!}] + destroy .e catch {unset ::e ::vVals} |