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 | 98a0a78086c2eb26ce3a0a351e4baf3938f56512 (patch) | |
tree | 49b948347168145b633b00546829b3816cf4db6a | |
parent | 1458a00b54cb96d3b5c8c1743447ea9d999c9300 (diff) | |
download | tk-98a0a78086c2eb26ce3a0a351e4baf3938f56512.zip tk-98a0a78086c2eb26ce3a0a351e4baf3938f56512.tar.gz tk-98a0a78086c2eb26ce3a0a351e4baf3938f56512.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.
-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 |