summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--tests/entry.test72
-rw-r--r--tests/winWm.test4
-rw-r--r--tests/wm.test6
4 files changed, 47 insertions, 41 deletions
diff --git a/ChangeLog b/ChangeLog
index 5c6ed2a..f655ff6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-07 Pat Thoyts <patthoyts@users.sourceforge.net>
+
+ * tests/entry.test: Removed dependency on precision in results
+ * tests/winWm.test: Fixed incorrect error strings
+ * tests/wm.test:
+
2008-10-06 Pat Thoyts <patthoyts@users.sourceforge.net>
* tests/winDialog.test: Fixed tests for Vista+
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)}}
diff --git a/tests/winWm.test b/tests/winWm.test
index 5267b28..9ba872f 100644
--- a/tests/winWm.test
+++ b/tests/winWm.test
@@ -9,7 +9,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: winWm.test,v 1.20 2008/08/30 21:52:26 aniap Exp $
+# RCS: @(#) $Id: winWm.test,v 1.21 2008/10/06 23:13:19 patthoyts Exp $
package require tcltest 2.2
namespace import ::tcltest::*
@@ -431,7 +431,7 @@ test winWm-7.4 {UpdateWrapper must maintain focus} -constraints win -setup {
test winWm-8.1 {Tk_WmCmd procedure, "iconphoto" option} -constraints win -body {
wm iconph .
-} -returnCodes error -result {wrong # args: should be "wm iconphoto window ?-default? image ?image ...?"}
+} -returnCodes error -result {wrong # args: should be "wm iconphoto window ?-default? image1 ?image2 ...?"}
test winWm-8.2 {Tk_WmCmd procedure, "iconphoto" option} -constraints win -setup {
destroy .t
} -body {
diff --git a/tests/wm.test b/tests/wm.test
index 725317d..8a75b86 100644
--- a/tests/wm.test
+++ b/tests/wm.test
@@ -7,7 +7,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: wm.test,v 1.42 2008/08/01 19:39:01 patthoyts Exp $
+# RCS: @(#) $Id: wm.test,v 1.43 2008/10/06 23:13:19 patthoyts Exp $
# This file tests window manager interactions that work across platforms.
# Window manager tests that only work on a specific platform should be placed
@@ -867,14 +867,14 @@ test wm-iconphoto-1.1 {usage} -returnCodes error -body {
} -result {wrong # args: should be "wm option window ?arg ...?"}
test wm-iconphoto-1.2 {usage} -returnCodes error -body {
wm iconphoto .
-} -result {wrong # args: should be "wm iconphoto window ?-default? image ?image ...?"}
+} -result {wrong # args: should be "wm iconphoto window ?-default? image1 ?image2 ...?"}
test wm-iconphoto-1.3 {usage} -returnCodes error -body {
wm iconphoto . notanimage
} -result {can't use "notanimage" as iconphoto: not a photo image}
test wm-iconphoto-1.4 {usage} -returnCodes error -body {
# we currently have no return info
wm iconphoto . -default
-} -result {wrong # args: should be "wm iconphoto window ?-default? image ?image ...?"}
+} -result {wrong # args: should be "wm iconphoto window ?-default? image1 ?image2 ...?"}
# All other iconphoto tests are platform specific