diff options
author | Ian Roxborough <irox@redhat.com> | 2001-09-10 00:22:29 +0000 |
---|---|---|
committer | Ian Roxborough <irox@redhat.com> | 2001-09-10 00:22:29 +0000 |
commit | ee7709783c85577eba6af30cd711e17e403befed (patch) | |
tree | 74233a880ee1f7e13c7ded61d093318e8c6e7d5c /tk/tests/canvText.test | |
parent | a850c17c374d03259483e799b09326d255e17487 (diff) | |
download | gdb-ee7709783c85577eba6af30cd711e17e403befed.tar.gz |
Tk 8.3 upgradeTK_8_3
Diffstat (limited to 'tk/tests/canvText.test')
-rw-r--r-- | tk/tests/canvText.test | 60 |
1 files changed, 52 insertions, 8 deletions
diff --git a/tk/tests/canvText.test b/tk/tests/canvText.test index b9d2afec87d..884a84223fc 100644 --- a/tk/tests/canvText.test +++ b/tk/tests/canvText.test @@ -3,14 +3,13 @@ # fashion for Tcl tests. # # Copyright (c) 1996-1997 Sun Microsystems, Inc. -# -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# Copyright (c) 1998-1999 by Scriptics Corporation. +# All rights reserved. # # RCS: @(#) $Id$ -if {"[info procs test]" != "test"} { - source defs +if {[lsearch [namespace children] ::tcltest] == -1} { + source [file join [pwd] [file dirname [info script]] defs.tcl] } foreach i [winfo children .] { @@ -106,7 +105,7 @@ test canvText-3.4 {TextCoords procedure} { } {10.0 10.0} test canvText-3.5 {TextCoords procedure} { list [catch {.c coords test 10} msg] $msg -} {1 {wrong # coordinates: expected 0 or 2, got 1}} +} {1 {wrong # coordinates: expected 2, got 1}} test canvText-3.6 {TextCoords procedure} { list [catch {.c coords test 10 10 10} msg] $msg } {1 {wrong # coordinates: expected 0 or 2, got 3}} @@ -174,7 +173,7 @@ test canvText-5.1 {ConfigureText procedure: adjust cursor} { .c delete x } {} -test canvText-6.1 {ComputeTextBbox procedure} {fonts} { +test canvText-6.1 {ComputeTextBbox procedure} {fonts nonPortable} { .c itemconfig test -font $font -text 0 .c coords test 0 0 set x {} @@ -200,7 +199,7 @@ test canvText-6.1 {ComputeTextBbox procedure} {fonts} { focus .c .c focus test .c itemconfig test -text "abcd\nefghi\njklmnopq" -test canvText-7.1 {DisplayText procedure: stippling} { +test canvText-7.0 {DisplayText procedure: stippling} { .c itemconfig test -stipple gray50 update .c itemconfig test -stipple {} @@ -241,6 +240,20 @@ test canvText-7.8 {DisplayText procedure: not selected} { .c select clear update } {} +test canvText-7.9 {DisplayText procedure: select end} { + catch {destroy .t} + toplevel .t + wm geometry .t +0+0 + canvas .t.c + pack .t.c + set id [.t.c create text 0 0 -text Dummy -anchor nw] + update + .t.c select from $id 0 + .t.c select to $id end + update + #catch {destroy .t} + update +} {} test canvText-8.1 {TextInsert procedure: 0 length insert} { .c insert test end {} @@ -491,3 +504,34 @@ restore showpage end %%EOF " + +test canvText-18.1 {bug fix 2525, find enclosed on text with newlines} { + catch {destroy .c} + canvas .c + pack .c + .c delete all + .c create text 100 100 -text Hello\n -anchor nw + set bbox [.c bbox 1] + set x2 [lindex $bbox 2] + set y2 [lindex $bbox 3] + incr y2 + update + .c find enclosed 99 99 [expr $x2 + $i] [expr $y2 + 1] +} 1 + +# cleanup +::tcltest::cleanupTests +return + + + + + + + + + + + + + |