summaryrefslogtreecommitdiffstats
path: root/tests/entry.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/entry.test')
-rw-r--r--tests/entry.test72
1 files changed, 36 insertions, 36 deletions
diff --git a/tests/entry.test b/tests/entry.test
index 51ff390..a628b84 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.24 2008/07/23 23:24:25 nijtmans Exp $
+# RCS: @(#) $Id: entry.test,v 1.25 2008/10/06 23:13:19 patthoyts Exp $
package require tcltest 2.2
namespace import ::tcltest::*
@@ -1353,10 +1353,10 @@ test entry-3.70 {EntryWidgetCmd procedure, "xview" widget command} -setup {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
.e xview 5
- .e xview
+ format {%.7f %.7f} {*}[.e xview]
} -cleanup {
destroy .e
-} -result {0.0537634 0.268817}
+} -result {0.0537634 0.2688172}
test entry-3.71 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
@@ -1376,7 +1376,7 @@ test entry-3.72 {EntryWidgetCmd procedure, "xview" widget command} -setup {
.e xview 0
.e icursor 10
.e xview insert
- .e xview
+ format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
} -result {0.107527 0.322581}
@@ -1406,10 +1406,10 @@ test entry-3.75 {EntryWidgetCmd procedure, "xview" widget command} -setup {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
.e xview moveto 0.5
- .e xview
+ format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
-} -result {0.505376 0.72043}
+} -result {0.505376 0.720430}
test entry-3.76 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
@@ -1441,7 +1441,7 @@ test entry-3.78 {EntryWidgetCmd procedure, "xview" widget command} -setup {
update
.e xview moveto 0
.e xview scroll 1 pages
- .e xview
+ format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
} -result {0.193548 0.408602}
@@ -1455,7 +1455,7 @@ test entry-3.79 {EntryWidgetCmd procedure, "xview" widget command} -setup {
.e xview moveto .9
update
.e xview scroll -2 p
- .e xview
+ format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
} -result {0.397849 0.612903}
@@ -1548,14 +1548,14 @@ test entry-3.86 {EntryWidgetCmd procedure, "xview" widget command} -setup {
# 0.106383 0.117021 0.117021
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]
+ lappend x [format {%.6f} [lindex [.e xview] 0]]
} -cleanup {
destroy .e
-} -result {0.0957447 0.106383 0.117021}
+} -result {0.095745 0.106383 0.117021}
test entry-3.87 {EntryWidgetCmd procedure} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
@@ -1675,10 +1675,10 @@ test entry-5.8 {ConfigureEntry procedure} -setup {
.e insert end "01234567890"
update
.e configure -width 5
- return $scrollInfo
+ return [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
-} -result {0 0.363636}
+} -result {0.000000 0.363636}
test entry-5.9 {ConfigureEntry procedure} -constraints {
@@ -1906,10 +1906,10 @@ test entry-7.1 {InsertChars procedure} -setup {
.e insert 0 abcde
.e insert 2 XXX
update
- list [.e get] $contents $scrollInfo
+ list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
-} -result {abXXXcde abXXXcde {0 1}}
+} -result {abXXXcde abXXXcde {0.000000 1.000000}}
test entry-7.2 {InsertChars procedure} -setup {
unset -nocomplain contents
@@ -1921,10 +1921,10 @@ test entry-7.2 {InsertChars procedure} -setup {
.e insert 0 abcde
.e insert 500 XXX
update
- list [.e get] $contents $scrollInfo
+ list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
-} -result {abcdeXXX abcdeXXX {0 1}}
+} -result {abcdeXXX abcdeXXX {0.000000 1.000000}}
test entry-7.3 {InsertChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
@@ -2053,10 +2053,10 @@ test entry-8.1 {DeleteChars procedure} -setup {
.e insert 0 abcde
.e delete 2 4
update
- list [.e get] $contents $scrollInfo
+ list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
-} -result {abe abe {0 1}}
+} -result {abe abe {0.000000 1.000000}}
test entry-8.2 {DeleteChars procedure} -setup {
unset -nocomplain contents
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
@@ -2067,10 +2067,10 @@ test entry-8.2 {DeleteChars procedure} -setup {
.e insert 0 abcde
.e delete -2 2
update
- list [.e get] $contents $scrollInfo
+ list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
-} -result {cde cde {0 1}}
+} -result {cde cde {0.000000 1.000000}}
test entry-8.3 {DeleteChars procedure} -setup {
unset -nocomplain contents
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
@@ -2081,10 +2081,10 @@ test entry-8.3 {DeleteChars procedure} -setup {
.e insert 0 abcde
.e delete 3 1000
update
- list [.e get] $contents $scrollInfo
+ list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
-} -result {abc abc {0 1}}
+} -result {abc abc {0.000000 1.000000}}
test entry-8.4 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
@@ -2879,10 +2879,10 @@ test entry-16.2 {EntryVisibleRange procedure} -constraints {
pack .e
update
.e insert 0 "............................."
- .e xview
+ format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
-} -result {0 0.275862}
+} -result {0.000000 0.275862}
test entry-16.3 {EntryVisibleRange procedure} -constraints {
win
} -body {
@@ -2890,16 +2890,16 @@ test entry-16.3 {EntryVisibleRange procedure} -constraints {
pack .e
update
.e insert 0 XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
- .e xview
+ format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
-} -result {0 0.827586}
+} -result {0.000000 0.827586}
test entry-16.4 {EntryVisibleRange procedure} -body {
entry .e -show ""
- .e xview
+ format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
-} -result {0 1}
+} -result {0.000000 1.000000}
test entry-17.1 {EntryUpdateScrollbar procedure} -body {
@@ -2908,27 +2908,27 @@ test entry-17.1 {EntryUpdateScrollbar procedure} -body {
.e delete 0 end
.e insert 0 123
update
- return $scrollInfo
+ return [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
-} -result {0 1}
+} -result {0.000000 1.000000}
test entry-17.2 {EntryUpdateScrollbar procedure} -body {
entry .e -width 10 -xscrollcommand scroll -font {Courier -12}
pack .e
.e insert 0 0123456789abcdef
.e xview 3
update
- return $scrollInfo
+ return [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
-} -result {0.1875 0.8125}
+} -result {0.187500 0.812500}
test entry-17.3 {EntryUpdateScrollbar procedure} -body {
entry .e -width 10 -xscrollcommand scroll -font {Courier -12}
pack .e
.e insert 0 abcdefghijklmnopqrs
.e xview 6
update
- return $scrollInfo
+ return [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
} -result {0.315789 0.842105}
@@ -2947,7 +2947,7 @@ test entry-17.4 {EntryUpdateScrollbar procedure} -setup {
rename bgerror {}
} -result {{invalid command name "thisisnotacommand"} {invalid command name "thisisnotacommand"
while executing
-"thisisnotacommand 0 1"
+"thisisnotacommand 0.0 1.0"
(horizontal scrolling command executed by .e)}}