summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2006-03-26 17:52:39 (GMT)
committervincentdarley <vincentdarley>2006-03-26 17:52:39 (GMT)
commit5f87593323244e86ce48d4aa8c21ad14f5d91db3 (patch)
treefa2d32110894ce98d8ef904e86749aa9d72f1442 /tests
parentfdcd47db9dfd574392d0ef615177b3435fd923c8 (diff)
downloadtk-5f87593323244e86ce48d4aa8c21ad14f5d91db3.zip
tk-5f87593323244e86ce48d4aa8c21ad14f5d91db3.tar.gz
tk-5f87593323244e86ce48d4aa8c21ad14f5d91db3.tar.bz2
fix for text dump -command callbacks which modify the text widget
Diffstat (limited to 'tests')
-rw-r--r--tests/text.test15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/text.test b/tests/text.test
index a12d97e..2cb3342 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: text.test,v 1.41 2005/12/02 17:23:44 dgp Exp $
+# RCS: @(#) $Id: text.test,v 1.42 2006/03/26 17:52:40 vincentdarley Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -3712,6 +3712,19 @@ test text-32.1 {peer widget -start, -end and selection} {
set res
} {{10.0 20.0} {6.0 16.0} {6.0 11.0} {1.0 6.0} {1.0 2.0} {} {10.0 20.0}}
+test text-33.1 {widget dump -command alters tags} {
+ .t delete 1.0 end
+ .t insert end "abc\n" a "---" {} "def" b " \n" {} "ghi\n" c
+ .t tag configure b -background red
+
+ proc Dumpy {key value index} {
+ #puts "KK: $key, $value"
+ .t tag add $value [list $index linestart] [list $index lineend]
+ }
+ .t dump -all -command Dumpy 1.0 end
+ set result "ok"
+} {ok}
+
deleteWindows
option clear