diff options
author | fvogel <fvogelnew1@free.fr> | 2017-09-23 07:09:47 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2017-09-23 07:09:47 (GMT) |
commit | 36f97876122d9b8cd444ec9f554e6ee8d972dea0 (patch) | |
tree | 49b948347168145b633b00546829b3816cf4db6a /tests/text.test | |
parent | 9cd16d73c3ffe93977a7fba71483ca56869cdb88 (diff) | |
download | tk-36f97876122d9b8cd444ec9f554e6ee8d972dea0.zip tk-36f97876122d9b8cd444ec9f554e6ee8d972dea0.tar.gz tk-36f97876122d9b8cd444ec9f554e6ee8d972dea0.tar.bz2 |
Clean the bgerror proc that is defined in some tests, which allows to put the new bugfix test after them, and get back to the original numbering of the tests that use bgerror. Improve the bugfix test by using a bgerror proc in order to catch the error if the test fails (much cleaner) instead of displaying it in a popup window.
Diffstat (limited to 'tests/text.test')
-rw-r--r-- | tests/text.test | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/tests/text.test b/tests/text.test index 6b4a597..d9af434 100644 --- a/tests/text.test +++ b/tests/text.test @@ -7305,22 +7305,7 @@ test text-35.3 {widget dump -command destroys widget} -setup { } -result {ok} -test text-36.1 "bug #dd9667635d: text anchor not set" -setup { - destroy .t - pack [text .t] -} -body { - .t insert end "Hello world!" - .t tag add sel 1.0 end - # this line shall not trigger error: - # bad text index "tk::anchor1" - event generate .t <<SelectPrevLine>> - update -} -cleanup { - destroy .t -} -result {} - - -test text-37.1 "bug #1777362: event handling with hyphenated windows" -setup { +test text-36.1 "bug #1777362: event handling with hyphenated windows" -setup { proc bgerror {m} {set ::my_error $m} set ::my_error {} pack [set w [text .t-1]] @@ -7332,8 +7317,9 @@ test text-37.1 "bug #1777362: event handling with hyphenated windows" -setup { set ::my_error } -cleanup { destroy .t-1 + rename bgerror "" } -result {} -test text-37.2 "bug #1777362: event handling with hyphenated windows" -setup { +test text-36.2 "bug #1777362: event handling with hyphenated windows" -setup { proc bgerror {m} {set ::my_error $m} set ::my_error {} pack [set w [text .t+1]] @@ -7345,8 +7331,9 @@ test text-37.2 "bug #1777362: event handling with hyphenated windows" -setup { set ::my_error } -cleanup { destroy $w + rename bgerror "" } -result {} -test text-37.3 "bug #1777362: event handling with hyphenated windows" -setup { +test text-36.3 "bug #1777362: event handling with hyphenated windows" -setup { proc bgerror {m} {set ::my_error $m} set ::my_error {} pack [set w [text .t*1]] @@ -7358,6 +7345,25 @@ test text-37.3 "bug #1777362: event handling with hyphenated windows" -setup { set ::my_error } -cleanup { destroy $w + rename bgerror "" +} -result {} + + +test text-37.1 "bug #dd9667635d: text anchor not set" -setup { + proc bgerror {m} {set ::my_error $m} + destroy .t + pack [text .t] +} -body { + .t insert end "Hello world!" + .t tag add sel 1.0 end + # this line shall not trigger error: + # bad text index "tk::anchorN" + event generate .t <<SelectPrevLine>> + update + set ::my_error +} -cleanup { + destroy .t + rename bgerror "" } -result {} # cleanup |