summaryrefslogtreecommitdiffstats
path: root/tests/text.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-07-13 20:28:35 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-07-13 20:28:35 (GMT)
commit05961d4dc9e4b65d07feac195998ca0f969b06d9 (patch)
tree83ce372d1ae9d46d27acc5638739bddcbc8e6ba6 /tests/text.test
parent511415799ba6bf2ec3e5d90c57dfbb61da8c6da1 (diff)
downloadtk-05961d4dc9e4b65d07feac195998ca0f969b06d9.zip
tk-05961d4dc9e4b65d07feac195998ca0f969b06d9.tar.gz
tk-05961d4dc9e4b65d07feac195998ca0f969b06d9.tar.bz2
* Converted more files to tcltest and factored out common code.
Diffstat (limited to 'tests/text.test')
-rw-r--r--tests/text.test24
1 files changed, 10 insertions, 14 deletions
diff --git a/tests/text.test b/tests/text.test
index 7ae80a0..0ea9165 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -6,18 +6,14 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: text.test,v 1.17 2002/07/12 21:08:49 dgp Exp $
+# RCS: @(#) $Id: text.test,v 1.18 2002/07/13 20:28:35 dgp Exp $
package require tcltest 2.1
-namespace import -force tcltest::test
-namespace import -force tcltest::testsDirectory
namespace import -force tcltest::configure
+namespace import -force tcltest::testsDirectory
configure -testdir [file join [pwd] [file dirname [info script]]]
configure -loadfile [file join [testsDirectory] constraints.tcl]
tcltest::loadTestedCommands
-eval configure $argv
-
-eval destroy [winfo child .]
# Create entries in the option database to be sure that geometry options
# like border width have predictable values.
@@ -1196,13 +1192,13 @@ test text-20.65 {TextSearchCmd, unicode with non-text segments} {
} {1.3 3}
test text-20.66 {TextSearchCmd, hidden text does not affect match index} {
- eval destroy [winfo child .]
+ deleteWindows
pack [text .t2]
.t2 insert end "12345H7890"
.t2 search 7 1.0
} 1.6
test text-20.67 {TextSearchCmd, hidden text does not affect match index} {
- eval destroy [winfo child .]
+ deleteWindows
pack [text .t2]
.t2 insert end "12345H7890"
.t2 tag configure hidden -elide true
@@ -1210,13 +1206,13 @@ test text-20.67 {TextSearchCmd, hidden text does not affect match index} {
.t2 search 7 1.0
} 1.6
test text-20.68 {TextSearchCmd, hidden text does not affect match index} {
- eval destroy [winfo child .]
+ deleteWindows
pack [text .t2]
.t2 insert end "foobar\nbarbaz\nbazboo"
.t2 search boo 1.0
} 3.3
test text-20.69 {TextSearchCmd, hidden text does not affect match index} {
- eval destroy [winfo child .]
+ deleteWindows
pack [text .t2]
.t2 insert end "foobar\nbarbaz\nbazboo"
.t2 tag configure hidden -elide true
@@ -1249,7 +1245,7 @@ test text-20.72 {TextSearchCmd, -regexp -nocase searches} {
set res
} 1.0
-eval destroy [winfo child .]
+deleteWindows
text .t2 -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 100
pack .t2
.t2 insert end "1\t2\t3\t4\t55.5"
@@ -1287,7 +1283,7 @@ test text-21.7 {TkTextGetTabs procedure} {
list [catch {.t2 configure -tabs {100 !44 200 lork}} msg] $msg
} {1 {bad screen distance "!44"}}
-eval destroy [winfo child .]
+deleteWindows
text .t
pack .t
.t insert 1.0 "One Line"
@@ -1428,7 +1424,7 @@ test text-22.26 {TextDumpCmd procedure, unicode characters} {
} "text abc\xb1\xb1\xb1 1.0 mark insert 1.6 mark current 1.6 text {\n} 1.6"
set l [interp hidden]
-eval destroy [winfo children .]
+deleteWindows
test text-23.1 {text widget vs hidden commands} {
catch {destroy .t}
@@ -1577,7 +1573,7 @@ test text-25.13 {-maxundo configuration option} {
.t get 1.0 end
} "line 1\n\n"
-eval destroy [winfo child .]
+deleteWindows
option clear
# cleanup