diff options
author | dgp <dgp@users.sourceforge.net> | 2015-12-22 20:59:26 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2015-12-22 20:59:26 (GMT) |
commit | 6c0187f324138cc7e5f7aeaafa9718bd32e536c4 (patch) | |
tree | bc8f4a77a394c66aec3e7331dc24a3ede72efc6c /tests/entry.test | |
parent | 87dca641534768e549dd5ff1d43f7111ae4ef578 (diff) | |
parent | 56005a00aae9d8be182d5643373980ee371417d6 (diff) | |
download | tk-6c0187f324138cc7e5f7aeaafa9718bd32e536c4.zip tk-6c0187f324138cc7e5f7aeaafa9718bd32e536c4.tar.gz tk-6c0187f324138cc7e5f7aeaafa9718bd32e536c4.tar.bz2 |
merge 8.5
Diffstat (limited to 'tests/entry.test')
-rw-r--r-- | tests/entry.test | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/tests/entry.test b/tests/entry.test index 27acfc1..da3637d 100644 --- a/tests/entry.test +++ b/tests/entry.test @@ -1621,13 +1621,32 @@ 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!}] + +test entry-24.1 {textvariable lives in a non-existing namespace} { + destroy .e + catch {entry .e -textvariable thisnsdoesntexist::myvar} result1 + set result1 +} {can't trace "thisnsdoesntexist::myvar": parent namespace doesn't exist} + destroy .e # XXX Still need to write tests for EntryBlinkProc, EntryFocusProc, |