diff options
author | fvogel <fvogelnew1@free.fr> | 2018-09-30 10:00:01 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2018-09-30 10:00:01 (GMT) |
commit | 62d807f1be365d52a6a7f04a30d7ebdec7a8836b (patch) | |
tree | 2fcf466bf233ba30496ce83a01aa19626bb1eb94 /tests | |
parent | 1603ff2057cee3dfc3780d2ae7bb40d2f7ca1248 (diff) | |
download | tk-62d807f1be365d52a6a7f04a30d7ebdec7a8836b.zip tk-62d807f1be365d52a6a7f04a30d7ebdec7a8836b.tar.gz tk-62d807f1be365d52a6a7f04a30d7ebdec7a8836b.tar.bz2 |
Fix bitmap-4.1, color-4.1 and cursor-4.1 by cherrypicking the fix [ae13ed65] from trunk. Ticket [ad98f10b3a] dealt with trunk only, the problem appears to be seen in core-8-6-branch as well when running this Tk branch with core-8-branch of Tcl, on Linux Debian 8 at least.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bitmap.test | 9 | ||||
-rw-r--r-- | tests/color.test | 16 | ||||
-rw-r--r-- | tests/cursor.test | 9 |
3 files changed, 23 insertions, 11 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}} {}} |