summaryrefslogtreecommitdiffstats
path: root/tests/entry.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-10-09 17:17:55 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-10-09 17:17:55 (GMT)
commit6f5e830d15c03e9f1b460e344a469b9f32f80b9f (patch)
tree68cee57827743359748d2138cf7e59fb0d46aa0d /tests/entry.test
parentd4dd7c92ae8e2060999250bd2402fc5814d5b2d7 (diff)
downloadtk-6f5e830d15c03e9f1b460e344a469b9f32f80b9f.zip
tk-6f5e830d15c03e9f1b460e344a469b9f32f80b9f.tar.gz
tk-6f5e830d15c03e9f1b460e344a469b9f32f80b9f.tar.bz2
* tests/canvText.test: Backport test updates in light of the
* tests/entry.test: 2008-10-05 commit.
Diffstat (limited to 'tests/entry.test')
-rw-r--r--tests/entry.test82
1 files changed, 41 insertions, 41 deletions
diff --git a/tests/entry.test b/tests/entry.test
index dadf623..022aa80 100644
--- a/tests/entry.test
+++ b/tests/entry.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: entry.test,v 1.22 2007/12/13 15:27:54 dgp Exp $
+# RCS: @(#) $Id: entry.test,v 1.22.2.1 2008/10/09 17:17:55 dgp Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -467,8 +467,8 @@ test entry-3.64b {EntryWidgetCmd procedure, "selection to" widget command} {
} {1 {wrong # args: should be ".e selection to index"}}
test entry-3.65 {EntryWidgetCmd procedure, "xview" widget command} {
.e xview 5
- .e xview
-} {0.0537634 0.268817}
+ format {%.7f %.7f} {*}[.e xview]
+} {0.0537634 0.2688172}
test entry-3.66 {EntryWidgetCmd procedure, "xview" widget command} {
list [catch {.e xview gorp} msg] $msg
} {1 {bad entry index "gorp"}}
@@ -476,7 +476,7 @@ test entry-3.67 {EntryWidgetCmd procedure, "xview" widget command} {
.e xview 0
.e icursor 10
.e xview insert
- .e xview
+ format {%.6f %.6f} {*}[.e xview]
} {0.107527 0.322581}
test entry-3.68 {EntryWidgetCmd procedure, "xview" widget command} {
list [catch {.e xview moveto foo bar} msg] $msg
@@ -486,8 +486,8 @@ test entry-3.69 {EntryWidgetCmd procedure, "xview" widget command} {
} {1 {expected floating-point number but got "foo"}}
test entry-3.70 {EntryWidgetCmd procedure, "xview" widget command} {
.e xview moveto 0.5
- .e xview
-} {0.505376 0.72043}
+ format {%.6f %.6f} {*}[.e xview]
+} {0.505376 0.720430}
test entry-3.71 {EntryWidgetCmd procedure, "xview" widget command} {
list [catch {.e xview scroll 24} msg] $msg
} {1 {wrong # args: should be ".e xview scroll number units|pages"}}
@@ -497,13 +497,13 @@ test entry-3.72 {EntryWidgetCmd procedure, "xview" widget command} {
test entry-3.73 {EntryWidgetCmd procedure, "xview" widget command} {
.e xview moveto 0
.e xview scroll 1 pages
- .e xview
+ format {%.6f %.6f} {*}[.e xview]
} {0.193548 0.408602}
test entry-3.74 {EntryWidgetCmd procedure, "xview" widget command} {
.e xview moveto .9
update
.e xview scroll -2 p
- .e xview
+ format {%.6f %.6f} {*}[.e xview]
} {0.397849 0.612903}
test entry-3.75 {EntryWidgetCmd procedure, "xview" widget command} {
.e xview 30
@@ -541,12 +541,12 @@ test entry-3.81 {EntryWidgetCmd procedure, "xview" widget command} {
set x {}
.e xview moveto .1
- lappend x [lindex [.e xview] 0]
+ lappend x [format {%.6f} [lindex [.e xview] 0]]
.e xview moveto .11
- lappend x [lindex [.e xview] 0]
+ lappend x [format {%.6f} [lindex [.e xview] 0]]
.e xview moveto .12
- lappend x [lindex [.e xview] 0]
-} {0.0957447 0.106383 0.117021}
+ lappend x [format {%.6f} [lindex [.e xview] 0]]
+} {0.095745 0.106383 0.117021}
test entry-3.82 {EntryWidgetCmd procedure} {
list [catch {.e gorp} msg] $msg
} {1 {bad option "gorp": must be bbox, cget, configure, delete, get, icursor, index, insert, scan, selection, validate, or xview}}
@@ -638,8 +638,8 @@ test entry-5.7 {ConfigureEntry procedure} {
.e insert end "01234567890"
update
.e configure -width 5
- set scrollInfo
-} {0 0.363636}
+ format {%.6f %.6f} {*}$scrollInfo
+} {0.000000 0.363636}
test entry-5.8 {ConfigureEntry procedure} {fonts} {
catch {destroy .e}
entry .e -width 0
@@ -790,15 +790,15 @@ test entry-7.1 {InsertChars procedure} {
.e insert 0 abcde
.e insert 2 XXX
update
- list [.e get] $contents $scrollInfo
-} {abXXXcde abXXXcde {0 1}}
+ list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
+} {abXXXcde abXXXcde {0.000000 1.000000}}
test entry-7.2 {InsertChars procedure} {
.e delete 0 end
.e insert 0 abcde
.e insert 500 XXX
update
- list [.e get] $contents $scrollInfo
-} {abcdeXXX abcdeXXX {0 1}}
+ list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
+} {abcdeXXX abcdeXXX {0.000000 1.000000}}
test entry-7.3 {InsertChars procedure} {
.e delete 0 end
.e insert 0 0123456789
@@ -884,22 +884,22 @@ test entry-8.1 {DeleteChars procedure} {
.e insert 0 abcde
.e delete 2 4
update
- list [.e get] $contents $scrollInfo
-} {abe abe {0 1}}
+ list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
+} {abe abe {0.000000 1.000000}}
test entry-8.2 {DeleteChars procedure} {
.e delete 0 end
.e insert 0 abcde
.e delete -2 2
update
- list [.e get] $contents $scrollInfo
-} {cde cde {0 1}}
+ list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
+} {cde cde {0.000000 1.000000}}
test entry-8.3 {DeleteChars procedure} {
.e delete 0 end
.e insert 0 abcde
.e delete 3 1000
update
- list [.e get] $contents $scrollInfo
-} {abc abc {0 1}}
+ list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
+} {abc abc {0.000000 1.000000}}
test entry-8.4 {DeleteChars procedure} {
.e delete 0 end
.e insert 0 0123456789abcde
@@ -1313,25 +1313,25 @@ update
test entry-16.1 {EntryVisibleRange procedure} {fonts} {
.e delete 0 end
.e insert 0 .............................
- .e xview
-} {0 0.827586}
-test entry-15.2 {EntryVisibleRange procedure} {unix fonts} {
+ format {%.6f %.6f} {*}[.e xview]
+} {0.000000 0.827586}
+test entry-16.2 {EntryVisibleRange procedure} {unix fonts} {
.e configure -show X
.e delete 0 end
.e insert 0 .............................
- .e xview
-} {0 0.275862}
-test entry-15.3 {EntryVisibleRange procedure} win {
+ format {%.6f %.6f} {*}[.e xview]
+} {0.000000 0.275862}
+test entry-16.3 {EntryVisibleRange procedure} win {
.e configure -show .
.e delete 0 end
.e insert 0 XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
- .e xview
-} {0 0.827586}
+ format {%.6f %.6f} {*}[.e xview]
+} {0.000000 0.827586}
.e configure -show ""
-test entry-15.4 {EntryVisibleRange procedure} {
+test entry-16.4 {EntryVisibleRange procedure} {
.e delete 0 end
- .e xview
-} {0 1}
+ format {%.6f %.6f} {*}[.e xview]
+} {0.000000 1.000000}
catch {destroy .e}
entry .e -width 10 -xscrollcommand scroll -font $fixed
@@ -1341,21 +1341,21 @@ test entry-17.1 {EntryUpdateScrollbar procedure} {
.e delete 0 end
.e insert 0 123
update
- set scrollInfo
-} {0 1}
+ format {%.6f %.6f} {*}$scrollInfo
+} {0.000000 1.000000}
test entry-17.2 {EntryUpdateScrollbar procedure} {
.e delete 0 end
.e insert 0 0123456789abcdef
.e xview 3
update
- set scrollInfo
-} {0.1875 0.8125}
+ format {%.6f %.6f} {*}$scrollInfo
+} {0.187500 0.812500}
test entry-17.3 {EntryUpdateScrollbar procedure} {
.e delete 0 end
.e insert 0 abcdefghijklmnopqrs
.e xview 6
update
- set scrollInfo
+ format {%.6f %.6f} {*}$scrollInfo
} {0.315789 0.842105}
test entry-17.4 {EntryUpdateScrollbar procedure} {
destroy .e
@@ -1370,7 +1370,7 @@ test entry-17.4 {EntryUpdateScrollbar procedure} {
list $x $errorInfo
} {{invalid command name "thisisnotacommand"} {invalid command name "thisisnotacommand"
while executing
-"thisisnotacommand 0 1"
+"thisisnotacommand 0.0 1.0"
(horizontal scrolling command executed by .e)}}
set l [interp hidden]