summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2018-10-06 09:54:12 (GMT)
committerfvogel <fvogelnew1@free.fr>2018-10-06 09:54:12 (GMT)
commit4c2f8a997102b0aa6c145f91e3475914d5dc4a2d (patch)
tree33d7200dd20b53dd14fe117b133f8d708638cdbb /tests
parent1ec5f8b0006457583d55090fa81567395172f48f (diff)
parent3cbbcdd337410cb9ca92db772d1a09076443acd4 (diff)
downloadtk-4c2f8a997102b0aa6c145f91e3475914d5dc4a2d.zip
tk-4c2f8a997102b0aa6c145f91e3475914d5dc4a2d.tar.gz
tk-4c2f8a997102b0aa6c145f91e3475914d5dc4a2d.tar.bz2
merge core-8-6-branch
Diffstat (limited to 'tests')
-rw-r--r--tests/bitmap.test9
-rw-r--r--tests/color.test16
-rw-r--r--tests/cursor.test9
-rw-r--r--tests/font.test2
4 files changed, 24 insertions, 12 deletions
diff --git a/tests/bitmap.test b/tests/bitmap.test
index 6e2573f..fea675d 100644
--- a/tests/bitmap.test
+++ b/tests/bitmap.test
@@ -84,12 +84,14 @@ test bitmap-3.1 {Tk_FreeBitmapFromObj - reference counts} -constraints {
test bitmap-4.1 {FreeBitmapObjProc} -constraints {
testbitmap
+} -setup {
+ proc copy {s} {return [string index $s 0][string range $s 1 end]}
} -body {
- set x [join questhead]
+ set x [copy questhead]
button .b -bitmap $x
- set y [join questhead]
+ set y [copy questhead]
.b configure -bitmap $y
- set z [join questhead]
+ set z [copy questhead]
.b configure -bitmap $z
set result {}
lappend result [testbitmap questhead]
@@ -102,6 +104,7 @@ test bitmap-4.1 {FreeBitmapObjProc} -constraints {
set y bogus
return $result
} -cleanup {
+ rename copy {}
destroy .b
} -result {{{1 3}} {{1 2}} {{1 1}} {}}
diff --git a/tests/color.test b/tests/color.test
index aa20099..6fefd90 100644
--- a/tests/color.test
+++ b/tests/color.test
@@ -277,13 +277,17 @@ test color-3.4 {Tk_FreeColorFromObj - unlinking from list} colorsFree {
lappend result [testcolor purple]
} {{{4 1} {3 0} {2 0} {1 0}} {{4 1} {2 0} {1 0}} {{4 1} {2 0}} {{2 0}} {}}
-test color-4.1 {FreeColorObjProc} colorsFree {
+test color-4.1 {FreeColorObjProc} -constraints {
+ colorsFree
+} -setup {
+ proc copy {s} {return [string index $s 0][string range $s 1 end]}
+} -body {
destroy .b
- set x [format purple]
+ set x [copy purple]
button .b -foreground $x -text .b1
- set y [format purple]
+ set y [copy purple]
.b configure -foreground $y
- set z [format purple]
+ set z [copy purple]
.b configure -foreground $z
set result {}
lappend result [testcolor purple]
@@ -295,7 +299,9 @@ test color-4.1 {FreeColorObjProc} colorsFree {
lappend result [testcolor purple]
set y bogus
set result
-} {{{1 3}} {{1 2}} {{1 1}} {}}
+} -cleanup {
+ rename copy {}
+} -result {{{1 3}} {{1 2}} {{1 1}} {}}
destroy .t
diff --git a/tests/cursor.test b/tests/cursor.test
index ab7949e..172c982 100644
--- a/tests/cursor.test
+++ b/tests/cursor.test
@@ -144,12 +144,14 @@ test cursor-3.1 {Tk_FreeCursorFromObj - reference counts} -constraints {
test cursor-4.1 {FreeCursorObjProc} -constraints {
testcursor
+} -setup {
+ proc copy {s} {return [string index $s 0][string range $s 1 end]}
} -body {
- set x [join heart]
+ set x [copy heart]
button .b -cursor $x
- set y [join heart]
+ set y [copy heart]
.b configure -cursor $y
- set z [join heart]
+ set z [copy heart]
.b configure -cursor $z
set result {}
lappend result [testcursor heart]
@@ -162,6 +164,7 @@ test cursor-4.1 {FreeCursorObjProc} -constraints {
set y bogus
set result
} -cleanup {
+ rename copy {}
destroy .b
} -result {{{1 3}} {{1 2}} {{1 1}} {}}
diff --git a/tests/font.test b/tests/font.test
index 4fcf194..f7fb325 100644
--- a/tests/font.test
+++ b/tests/font.test
@@ -38,7 +38,7 @@ wm geom .t +0+0
update idletasks
switch [tk windowingsystem] {
- x11 {set fixed "fixed"}
+ x11 {set fixed "TkFixedFont"}
win32 {set fixed "courier 12"}
aqua {set fixed "monaco 9"}
}