diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-09-16 22:03:48 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-09-16 22:03:48 (GMT) |
commit | 76d9a30bfaf8b9ae70bcbab9cbe66c487129bd56 (patch) | |
tree | 01bf37ba54f3c4f0bc6e599909eb63eba5078144 /tests | |
parent | a3ba233aee169f23ead09b373bcabe49fef5965e (diff) | |
parent | 6ab1d5ec9aa0ecf66cf454b289ccfe7a25cdd717 (diff) | |
download | tk-76d9a30bfaf8b9ae70bcbab9cbe66c487129bd56.zip tk-76d9a30bfaf8b9ae70bcbab9cbe66c487129bd56.tar.gz tk-76d9a30bfaf8b9ae70bcbab9cbe66c487129bd56.tar.bz2 |
Merge 8.7
Diffstat (limited to 'tests')
-rw-r--r-- | tests/canvPs.test | 4 | ||||
-rw-r--r-- | tests/imgBmap.test | 2 | ||||
-rw-r--r-- | tests/oldpack.test | 2 | ||||
-rw-r--r-- | tests/ttk/treeview.test | 23 | ||||
-rw-r--r-- | tests/xmfbox.test | 12 |
5 files changed, 32 insertions, 11 deletions
diff --git a/tests/canvPs.test b/tests/canvPs.test index b3c81ea..1f3e1dc 100644 --- a/tests/canvPs.test +++ b/tests/canvPs.test @@ -133,9 +133,7 @@ test canvPs-2.4 {test writing to channel and file, same output} -constraints { destroy .c -test canvPs-3.1 {test ps generation with an embedded window} -constraints { - notAqua -} -setup { +test canvPs-3.1 {test ps generation with an embedded window} -setup { set bar [makeFile {} bar.ps] file delete $bar } -body { diff --git a/tests/imgBmap.test b/tests/imgBmap.test index 1beafac..ecb098e 100644 --- a/tests/imgBmap.test +++ b/tests/imgBmap.test @@ -221,7 +221,7 @@ test imageBmap-4.1 {ImgBmapConfigureInstance procedure: check error handling} -s test imageBmap-5.1 {GetBitmapData procedure} -body { list [catch {image create bitmap -file ~bad_user/a/b} msg] \ [string tolower $msg] -} -result {1 {user "bad_user" doesn't exist}} +} -result {1 {couldn't read bitmap file "~bad_user/a/b": no such file or directory}} test imageBmap-5.2 {GetBitmapData procedure} -body { list [catch {image create bitmap -file bad_name} msg] [string tolower $msg] } -result {1 {couldn't read bitmap file "bad_name": no such file or directory}} diff --git a/tests/oldpack.test b/tests/oldpack.test index a1ba276..d8a1bfe 100644 --- a/tests/oldpack.test +++ b/tests/oldpack.test @@ -32,7 +32,7 @@ place .pack.violet.l -relwidth 1.0 -relheight 1.0 if {![catch {pack ap .pack .pack.red top}]} { -# Don't execute any of this file if Tk is compiled with -DTCL_NO_DEPRECATED +# Don't execute any of this file if Tk is compiled with -DTK_NO_DEPRECATED test oldpack-1.1 {basic positioning} -body { diff --git a/tests/ttk/treeview.test b/tests/ttk/treeview.test index f32d37f..d8238a2 100644 --- a/tests/ttk/treeview.test +++ b/tests/ttk/treeview.test @@ -1342,6 +1342,29 @@ test treeview-ce470f20fd-4 "changing -stretch resizes columns" -setup { destroy .tv } -result {60 50 60 50 60 50 1} +test treeview-bc602049ab "treeview with custom background does not change size when switching themes" -setup { + image create photo tvbg -data { + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAnXAAAJ1wG + xbhe3AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAACJJREFUOI + 1jPLF9+38GKgImaho2auCogaMGjho4auBQMhAAyR0DXUEyypsAAAAASUVORK5CYII= + } + ttk::style theme create foo-bc602049ab -parent clam -settings { + ttk::style element create Treeview.field image tvbg -width 0 -height 0 + } + ttk::style theme use foo-bc602049ab + pack [ttk::treeview .tv] + update idletasks +} -body { + set g1 [winfo geometry .tv] + ttk::style theme use foo-bc602049ab + update idletasks + set g2 [winfo geometry .tv] + expr {$g1 eq $g2 ? 1 : "$g1 --> $g2"} +} -cleanup { + destroy .tv + image delete tvbg +} -result {1} + test treeview-column0-leak "Test for leak in tree column" -setup { destroy .ttt set heading [string range _Hej_ 1 3] diff --git a/tests/xmfbox.test b/tests/xmfbox.test index a6426ec..89eda3c 100644 --- a/tests/xmfbox.test +++ b/tests/xmfbox.test @@ -91,8 +91,8 @@ test xmfbox-2.1 {tk::MotifFDialog_InterpFilter, ~ in dir names} -constraints { set x [tk::MotifFDialog_Create foo open {}] $::tk::dialog::file::foo(fEnt) delete 0 end $::tk::dialog::file::foo(fEnt) insert 0 [pwd]/~nosuchuser1 - set kk [tk::MotifFDialog_InterpFilter $x] -} -result "$testPWD/~nosuchuser1 *" + file normalize [file join {*}[tk::MotifFDialog_InterpFilter $x]] +} -result "$testPWD/~nosuchuser1/*" test xmfbox-2.2 {tk::MotifFDialog_InterpFilter, ~ in file names} -constraints { unix @@ -102,8 +102,8 @@ test xmfbox-2.2 {tk::MotifFDialog_InterpFilter, ~ in file names} -constraints { set x [tk::MotifFDialog_Create foo open {}] $::tk::dialog::file::foo(fEnt) delete 0 end $::tk::dialog::file::foo(fEnt) insert 0 [pwd]/~nosuchuser1 - set kk [tk::MotifFDialog_InterpFilter $x] -} -result "$testPWD ./~nosuchuser1" + file normalize [file join {*}[tk::MotifFDialog_InterpFilter $x]] +} -result "$testPWD/~nosuchuser1" test xmfbox-2.3 {tk::MotifFDialog_Update, ~ in file names} -constraints { unix @@ -138,7 +138,7 @@ test xmfbox-2.5 {tk::MotifFDialog_BrowseFList, ~ in file names} -constraints { $::tk::dialog::file::foo(fList) selection clear 0 end $::tk::dialog::file::foo(fList) selection set $i tk::MotifFDialog_BrowseFList $x - $::tk::dialog::file::foo(sEnt) get + file normalize [$::tk::dialog::file::foo(sEnt) get] } -result "$testPWD/~nosuchuser1" test xmfbox-2.6 {tk::MotifFDialog_ActivateFList, ~ in file names} -constraints { @@ -153,7 +153,7 @@ test xmfbox-2.6 {tk::MotifFDialog_ActivateFList, ~ in file names} -constraints { tk::MotifFDialog_BrowseFList $x tk::MotifFDialog_ActivateFList $x list $::tk::dialog::file::foo(selectPath) \ - $::tk::dialog::file::foo(selectFile) $tk::Priv(selectFilePath) + $::tk::dialog::file::foo(selectFile) [file normalize $tk::Priv(selectFilePath)] } -result "$testPWD ~nosuchuser1 $testPWD/~nosuchuser1" # cleanup |