summaryrefslogtreecommitdiffstats
path: root/tests/textDisp.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2015-11-19 20:46:40 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2015-11-19 20:46:40 (GMT)
commitf0e7b98adcaa0890c60fdf84c8e9753f8f903a53 (patch)
tree02b9115f94d1ef5680576bf60aa762861eefc229 /tests/textDisp.test
parent8c6ac85de70a9f2ce13eecd5605fb55cfde6d911 (diff)
downloadtk-f0e7b98adcaa0890c60fdf84c8e9753f8f903a53.zip
tk-f0e7b98adcaa0890c60fdf84c8e9753f8f903a53.tar.gz
tk-f0e7b98adcaa0890c60fdf84c8e9753f8f903a53.tar.bz2
First test-implementation of "$t yupdate -command <command>". TODO: more testcases and documentation
Diffstat (limited to 'tests/textDisp.test')
-rw-r--r--tests/textDisp.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/textDisp.test b/tests/textDisp.test
index 4c88b38..f2b176c 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -4191,6 +4191,24 @@ test textDisp-34.1 {Line heights recalculation problem: bug 2677890} -setup {
destroy .t1
} -result {0}
+test textDisp-34.2 {text yupdate syntax} -body {
+} -body {
+ pack [text .t1] -expand 1 -fill both
+ .t1 yupdate foo
+} -cleanup {
+ destroy .t1
+} -returnCodes 1 -result {wrong # args: should be ".t1 yupdate ?-command command?"}
+
+test textDisp-34.3 {text yupdate syntax} -body {
+} -body {
+ set ::x 0
+ pack [text .t1] -expand 1 -fill both
+ .t1 yupdate -command [list set ::x 1]
+ set ::x
+} -cleanup {
+ destroy .t1
+} -result {1}
+
deleteWindows
option clear