diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-14 07:36:16 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-14 07:36:16 (GMT) |
commit | 075429fc2cc7afc986bc3839feacf935c89ccbc7 (patch) | |
tree | 974fdecf07326f588f07e04256d91c98b2fde350 /tests/imgPhoto.test | |
parent | 26d2f8ec042c3a1c076a64a8651aa88294ff6a0f (diff) | |
download | tk-075429fc2cc7afc986bc3839feacf935c89ccbc7.zip tk-075429fc2cc7afc986bc3839feacf935c89ccbc7.tar.gz tk-075429fc2cc7afc986bc3839feacf935c89ccbc7.tar.bz2 |
Use consistant $idx < 0 in stead of $idx != -1 for checking index meaning 'not found'
Diffstat (limited to 'tests/imgPhoto.test')
-rw-r--r-- | tests/imgPhoto.test | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test index 3c4c7a5..7767690 100644 --- a/tests/imgPhoto.test +++ b/tests/imgPhoto.test @@ -952,8 +952,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 |