summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2004-06-04 10:51:17 (GMT)
committervincentdarley <vincentdarley>2004-06-04 10:51:17 (GMT)
commit0599d09e8d0ef7c3d1d1afbd61e61e2a4c14b099 (patch)
treed72800bda1f80884a0368bed786b3e88820147df /tests
parentdf2af8293fc2b2a31a501cf87e04b8b34729dc9f (diff)
downloadtk-0599d09e8d0ef7c3d1d1afbd61e61e2a4c14b099.zip
tk-0599d09e8d0ef7c3d1d1afbd61e61e2a4c14b099.tar.gz
tk-0599d09e8d0ef7c3d1d1afbd61e61e2a4c14b099.tar.bz2
text widget fixes
Diffstat (limited to 'tests')
-rw-r--r--tests/textDisp.test8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/textDisp.test b/tests/textDisp.test
index f2a7803..3205ddb 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: textDisp.test,v 1.25 2004/05/23 17:34:49 dkf Exp $
+# RCS: @(#) $Id: textDisp.test,v 1.26 2004/06/04 10:51:18 vincentdarley Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -3153,8 +3153,10 @@ test textDisp-27.7 {SizeOfTab procedure, center alignment, wrap -none (potential
set tab [expr {$tab + $cm}]
}
# Now we've calculated to the end of the tab after 'a', add one
- # more for 'bb\t' and we're there, with 4 for the border
- set tab [expr {4 + int($tab + $cm)}]
+ # more for 'bb\t' and we're there, with 4 for the border. Since
+ # Tk_GetPixelsFromObj uses the standard 'int(0.5 + float)' rounding,
+ # so must we.
+ set tab [expr {4 + int(0.5 + $tab + $cm)}]
update
set res [.t bbox 2.23]
lset res 0 [expr {[lindex $res 0] - $tab}]