diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-14 07:37:17 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-14 07:37:17 (GMT) |
commit | e9dc305d78edf450789ae4494b6c44d7a2e0b65a (patch) | |
tree | 8c7849bbef27f12c25edeeb7a57e5d940b219b92 /tests | |
parent | 4511e01659c99d0bd13e19048e94bf5a543ef00d (diff) | |
parent | 075429fc2cc7afc986bc3839feacf935c89ccbc7 (diff) | |
download | tk-e9dc305d78edf450789ae4494b6c44d7a2e0b65a.zip tk-e9dc305d78edf450789ae4494b6c44d7a2e0b65a.tar.gz tk-e9dc305d78edf450789ae4494b6c44d7a2e0b65a.tar.bz2 |
Merge 8.6
Diffstat (limited to 'tests')
-rw-r--r-- | tests/color.test | 2 | ||||
-rw-r--r-- | tests/imgBmap.test | 4 | ||||
-rw-r--r-- | tests/imgPhoto.test | 4 | ||||
-rw-r--r-- | tests/textWind.test | 2 | ||||
-rw-r--r-- | tests/tk.test | 2 | ||||
-rw-r--r-- | tests/ttk/vsapi.test | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/tests/color.test b/tests/color.test index 4cdaf23..2fd09d2 100644 --- a/tests/color.test +++ b/tests/color.test @@ -162,7 +162,7 @@ test color-1.4 {Tk_AllocColorFromObj - try other colors in list} colorsFree { test color-1.5 {Color table} nonPortable { set fd [open ../xlib/rgb.txt] set result {} - while {[gets $fd line] != -1} { + while {[gets $fd line] >= 0} { if {[string index $line 0] == "!"} continue set rgb [c255 [winfo rgb . [lrange $line 3 end]]] if {$rgb != [lrange $line 0 2] } { diff --git a/tests/imgBmap.test b/tests/imgBmap.test index 4f36b47..f885c59 100644 --- a/tests/imgBmap.test +++ b/tests/imgBmap.test @@ -503,8 +503,8 @@ test imageBmap-11.2 {ImgBmapDelete procedure} -body { test imageBmap-12.1 {ImgBmapCmdDeletedProc procedure} -body { image create bitmap i2 -file foo.bm -maskfile foo2.bm rename i2 {} - list [lsearch -exact [imageNames] i2] [catch {i2 foo} msg] $msg -} -result {-1 1 {invalid command name "i2"}} + list [expr {i2 in [imageNames]}] [catch {i2 foo} msg] $msg +} -result {0 1 {invalid command name "i2"}} removeFile foo.bm removeFile foo2.bm diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test index 35b6ddb..ba7966a 100644 --- a/tests/imgPhoto.test +++ b/tests/imgPhoto.test @@ -1495,8 +1495,8 @@ test imgPhoto-9.1 {ImgPhotoCmdDeletedProc procedure} -constraints { } -body { image create photo photo2 -file $teapotPhotoFile rename photo2 {} - list [lsearch -exact [imageNames] photo2] [catch {photo2 foo} msg] $msg -} -result {-1 1 {invalid command name "photo2"}} + list [expr {photo2 in [imageNames]}] [catch {photo2 foo} msg] $msg +} -result {0 1 {invalid command name "photo2"}} test imgPhoto-10.1 {Tk_ImgPhotoPutBlock procedure} -setup { imageCleanup diff --git a/tests/textWind.test b/tests/textWind.test index fb3fcec..286964e 100644 --- a/tests/textWind.test +++ b/tests/textWind.test @@ -773,7 +773,7 @@ test textWind-10.6 {EmbWinLayoutProc procedure, error in creating window} -setup .t delete 1.0 end proc bgerror args { global msg - if {[lsearch -exact $msg $args] == -1} { + if {[lsearch -exact $msg $args] < 0} { lappend msg $args } } diff --git a/tests/tk.test b/tests/tk.test index 444c9a3..45690ce 100644 --- a/tests/tk.test +++ b/tests/tk.test @@ -159,7 +159,7 @@ test tk-6.5 {tk inactive} -body { update after 100 set i [tk inactive] - expr {$i == -1 || ( $i > 90 && $i < 200 )} + expr {$i < 0 || ( $i > 90 && $i < 200 )} } -result 1 test tk-7.1 {tk inactive in a safe interpreter} -body { diff --git a/tests/ttk/vsapi.test b/tests/ttk/vsapi.test index bb88fef..3966bd9 100644 --- a/tests/ttk/vsapi.test +++ b/tests/ttk/vsapi.test @@ -6,7 +6,7 @@ package require tcltest ; namespace import -force tcltest::* loadTestedCommands testConstraint xpnative \ - [expr {[lsearch -exact [ttk::style theme names] xpnative] != -1}] + [expr {"xpnative" in [ttk::style theme names]}] test vsapi-1.1 "WINDOW WP_SMALLCLOSEBUTTON" -constraints {xpnative} -body { ttk::style element create smallclose vsapi \ |