diff options
author | fvogelnew1@free.fr <fvogel> | 2015-12-19 22:50:03 (GMT) |
---|---|---|
committer | fvogelnew1@free.fr <fvogel> | 2015-12-19 22:50:03 (GMT) |
commit | efb68165f81be2e920ed9a3ffb0b89820b6e33c1 (patch) | |
tree | 467e89f0b026ad95e7d0e6919570f18df328abdb /tests/entry.test | |
parent | 0f605dcea6b0b3df5924c3eebc85678b989c2b99 (diff) | |
parent | c00f8ba98f04a2936f97cd34ef1e0049ad5cd8eb (diff) | |
download | tk-efb68165f81be2e920ed9a3ffb0b89820b6e33c1.zip tk-efb68165f81be2e920ed9a3ffb0b89820b6e33c1.tar.gz tk-efb68165f81be2e920ed9a3ffb0b89820b6e33c1.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.test | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/tests/entry.test b/tests/entry.test index f261f0d..4cc9218 100644 --- a/tests/entry.test +++ b/tests/entry.test @@ -3460,8 +3460,6 @@ test entry-22.1 {lost namespaced textvar} -body { namespace eval test { variable foo {a b} } entry .e -textvariable ::test::foo namespace delete test - .e insert end "more stuff" - .e delete 5 end set ::test::foo } -cleanup { destroy .e @@ -3470,13 +3468,30 @@ test entry-22.2 {lost namespaced textvar} -body { 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} - list [.e get] [.e cget -textvar] + 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 } -cleanup { destroy .e -} -result [list "a bmo" ::test::foo] +} -result [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} -setup { + destroy .e +} -body { + 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 +} -cleanup { + destroy .e +} -result [list {can't set "myvar": Intentional error here!} \ + {can't set "myvar": Intentional error here!}] # Gathered comments about lacks # XXX Still need to write tests for EntryBlinkProc, EntryFocusProc, |