summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-24 15:18:48 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-24 15:18:48 (GMT)
commit761a48b10bad97319cf219ecdb64247df25fe8a8 (patch)
tree59de4db593b2d6b63b33aebcdada380a0424aac5 /tests
parent7ff3d04b99965ac05c2b5356daf3a8ca08f1acbe (diff)
parent196c6c9af3eb4b96a9b0b94f7e41963167b534b8 (diff)
downloadtk-761a48b10bad97319cf219ecdb64247df25fe8a8.zip
tk-761a48b10bad97319cf219ecdb64247df25fe8a8.tar.gz
tk-761a48b10bad97319cf219ecdb64247df25fe8a8.tar.bz2
Merge trunk
Diffstat (limited to 'tests')
-rw-r--r--tests/canvas.test212
-rw-r--r--tests/dialog.test2
-rw-r--r--tests/font.test4
-rw-r--r--tests/grab.test2
-rw-r--r--tests/imgPhoto.test32
-rw-r--r--tests/listbox.test4
-rw-r--r--tests/menuDraw.test2
-rw-r--r--tests/scale.test14
-rw-r--r--tests/scrollbar.test2
-rw-r--r--tests/spinbox.test2
-rw-r--r--tests/text.test115
-rw-r--r--tests/textDisp.test8
-rw-r--r--tests/textWind.test14
-rw-r--r--tests/ttk/entry.test12
-rw-r--r--tests/ttk/spinbox.test2
15 files changed, 169 insertions, 258 deletions
diff --git a/tests/canvas.test b/tests/canvas.test
index e5e5ac9..46c745a 100644
--- a/tests/canvas.test
+++ b/tests/canvas.test
@@ -354,6 +354,22 @@ test canvas-8.1 {canvas arc bbox} -setup {
set arcSegBox [.c bbox arc4]
list $arcBox $coordBox $pieBox $arcSegBox
} -result {{48 21 100 94} {248 21 300 94} {398 21 500 112} {98 171 302 202}}
+test canvas-8.2 {canvas very small arc} -setup {
+ catch {destroy .c}
+ canvas .c
+} -body {
+ # no Inf or NaN must be generated even for very small arcs
+ .c create arc 0 100 0 100 -height 100 -style arc -outline "" -tags arc1
+ set arcBox [.c bbox arc1]
+ .c create arc 0 100 0 100 -height 100 -style arc -outline blue -tags arc2
+ set outlinedArcBox [.c bbox arc2]
+ set coords [.c coords arc1]
+ set start [.c itemcget arc1 -start]
+ set extent [.c itemcget arc1 -extent]
+ set width [.c itemcget arc1 -width]
+ set height [.c itemcget arc1 -height]
+ list $arcBox $outlinedArcBox $coords $start $extent $width $height
+} -result {{-1 99 1 101} {-2 98 2 102} {0.0 100.0 0.0 100.0} 0.0 0.0 1.0 0.0}
test canvas-9.1 {canvas id creation and deletion} -setup {
catch {destroy .c}
@@ -1004,112 +1020,6 @@ test canvas-20.3 {tag deletion - all tags match} -setup {
destroy .c
} -result {{tagA tagA tagA tagA tagA tagA} {}}
-# Procedure used in test cases 20.1 20.2 20.3
-proc matchPixels {pixels expected} {
- set matched 1
- foreach pline $pixels eline $expected {
- foreach ppixel $pline epixel $eline {
- if {$ppixel != $epixel} {
- set matched 0
- break
- }
- }
- }
- return $matched
-}
-
-test canvas-20.1 {canvas image} -setup {
- canvas .c
- image create photo testimage
-} -body {
- .c configure -background #c0c0c0 -scrollregion {0 0 9 9}
- .c create rectangle 0 0 0 9 -fill #000080 -outline #000080
- .c image testimage
- matchPixels [testimage data] { \
- {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
- {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
- {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
- {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
- {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
- {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
- {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
- {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
- {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
- {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0}}
-} -cleanup {
- destroy .c
- image delete testimage
-} -result 1
-
-test canvas-20.2 {canvas image with subsample} -setup {
- canvas .c
- image create photo testimage
-} -body {
- .c configure -background #c0c0c0 -scrollregion {0 0 9 9}
- .c create rectangle 0 0 1 9 -fill #008000 -outline #008000
- .c image testimage 2
- matchPixels [testimage data] { \
- {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
- {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
- {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
- {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
- {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0}}
-} -cleanup {
- destroy .c
- image delete testimage
-} -result 1
-
-test canvas-20.3 {canvas image with subsample and zoom} -setup {
- canvas .c
- image create photo testimage
-} -body {
- .c configure -background #c0c0c0 -scrollregion {0 0 9 9}
- .c create rectangle 0 0 9 0 -fill #800000 -outline #800000
- .c image testimage 1 2
- matchPixels [testimage data] { \
- {#800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000} \
- {#800000 #800000 #800000 #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} -setup {
- catch {destroy .c}
- canvas .c
-} -body {
- # no Inf or NaN must be generated even for very small arcs
- .c create arc 0 100 0 100 -height 100 -style arc -outline "" -tags arc1
- set arcBox [.c bbox arc1]
- .c create arc 0 100 0 100 -height 100 -style arc -outline blue -tags arc2
- set outlinedArcBox [.c bbox arc2]
- set coords [.c coords arc1]
- set start [.c itemcget arc1 -start]
- set extent [.c itemcget arc1 -extent]
- set width [.c itemcget arc1 -width]
- set height [.c itemcget arc1 -height]
- list $arcBox $outlinedArcBox $coords $start $extent $width $height
-} -result {{-1 99 1 101} {-2 98 2 102} {0.0 100.0 0.0 100.0} 0.0 0.0 1.0 0.0}
-
-
destroy .c
test canvas-21.1 {canvas rotate} -setup {
pack [canvas .c]
@@ -1292,7 +1202,95 @@ test canvas-22.9 {canvas rotate: window item rotation behaviour} -setup {
} -cleanup {
destroy .c
} -result {{50.00 150.00} {} {25 125 50 150}}
-
+
+# Procedure used in test cases 23.1 23.2 23.3
+proc matchPixels {pixels expected} {
+ set matched 1
+ foreach pline $pixels eline $expected {
+ foreach ppixel $pline epixel $eline {
+ if {$ppixel != $epixel} {
+ set matched 0
+ break
+ }
+ }
+ }
+ return $matched
+}
+
+test canvas-23.1 {canvas image} -setup {
+ canvas .c
+ image create photo testimage
+} -body {
+ .c configure -background #c0c0c0 -scrollregion {0 0 9 9}
+ .c create rectangle 0 0 0 9 -fill #000080 -outline #000080
+ .c image testimage
+ matchPixels [testimage data] { \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0}}
+} -cleanup {
+ destroy .c
+ image delete testimage
+} -result 1
+
+test canvas-23.2 {canvas image with subsample} -setup {
+ canvas .c
+ image create photo testimage
+} -body {
+ .c configure -background #c0c0c0 -scrollregion {0 0 9 9}
+ .c create rectangle 0 0 1 9 -fill #008000 -outline #008000
+ .c image testimage 2
+ matchPixels [testimage data] { \
+ {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0}}
+} -cleanup {
+ destroy .c
+ image delete testimage
+} -result 1
+
+test canvas-23.3 {canvas image with subsample and zoom} -setup {
+ canvas .c
+ image create photo testimage
+} -body {
+ .c configure -background #c0c0c0 -scrollregion {0 0 9 9}
+ .c create rectangle 0 0 9 0 -fill #800000 -outline #800000
+ .c image testimage 1 2
+ matchPixels [testimage data] { \
+ {#800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000} \
+ {#800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0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0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0}}
+} -cleanup {
+ destroy .c
+ image delete testimage
+} -result 1
+
# cleanup
imageCleanup
cleanupTests
diff --git a/tests/dialog.test b/tests/dialog.test
index 3ca5146..692d928 100644
--- a/tests/dialog.test
+++ b/tests/dialog.test
@@ -60,7 +60,7 @@ test dialog-2.3 {tk_dialog operation} -body {
return $res
} -cleanup {
destroy .b
-} -result {-1}
+} -result -1
cleanupTests
return
diff --git a/tests/font.test b/tests/font.test
index aa7137a..28ac799 100644
--- a/tests/font.test
+++ b/tests/font.test
@@ -1681,14 +1681,14 @@ destroy .t.f
pack [label .t.f]
update
test font-27.1 {Tk_UnderlineTextLayout procedure: no underline chosen} -body {
- .t.f config -text "foo" -under -1
+ .t.f config -text "foo" -underline -1
} -result {}
test font-27.2 {Tk_UnderlineTextLayout procedure: underline not visible} -body {
.t.f config -text "000 00000" -wrap [expr $ax*7] -under 10
} -result {}
test font-27.3 {Tk_UnderlineTextLayout procedure: underline is visible} -body {
.t.f config -text "000 00000" -wrap [expr $ax*7] -under 5
- .t.f config -wrap -1 -under -1
+ .t.f config -wrap -1 -underline -1
} -result {}
destroy .t.f
diff --git a/tests/grab.test b/tests/grab.test
index 653d756..0be5b61 100644
--- a/tests/grab.test
+++ b/tests/grab.test
@@ -107,7 +107,7 @@ test grab-2.1 {Tk_GrabObjCmd, grab status gives correct status} -body {
grab status .
} -cleanup {
grab release .
-} -result {none}
+} -result none
test grab-2.2 {Tk_GrabObjCmd, grab status gives correct status} -body {
set curr [grab current .]
if { [string length $curr] > 0 } {
diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test
index 782a210..9c33738 100644
--- a/tests/imgPhoto.test
+++ b/tests/imgPhoto.test
@@ -951,7 +951,7 @@ test imgPhoto-4.75 {<photo> read command: filename starting with '-'} -constrain
image delete photo1
file delete ./-teapotPhotoFile
} -result {}
-test imgPhoto-4.76 {ImgPhotoCmd procedure: copy to same image} -constraints {
+test imgPhoto-4.75.1 {ImgPhotoCmd procedure: copy to same image} -constraints {
hasTeapotPhoto
} -setup {
imageCleanup
@@ -963,7 +963,7 @@ test imgPhoto-4.76 {ImgPhotoCmd procedure: copy to same image} -constraints {
} -cleanup {
imageCleanup
} -result {}
-test imgPhoto-4.76 {ImgPhotoCmd, transparancy get: too many options} -setup {
+test imgPhoto-4.76 {ImgPhotoCmd, transparency get: too many options} -setup {
image create photo photo1
} -body {
photo1 put white -to 0 0 1 1
@@ -1941,9 +1941,9 @@ test imgPhoto-19.8 {MatchStirngFormat: invalid data for gif} -setup {
} -returnCodes error -result {couldn't recognize image data}
# Reject corrupted or truncated image [Bug b601ce3ab1].
-# WARNING - tests 18.1-18.9 will cause a segfault on 8.5.19 and lower,
+# WARNING - tests 20.1-20.9 will cause a segfault on 8.5.19 and lower,
# and on 8.6.6 and lower.
-test imgPhoto-18.1 {Reject corrupted GIF (binary string)} -setup {
+test imgPhoto-20.1 {Reject corrupted GIF (binary string)} -setup {
set data [binary decode base64 {
R0lGODlhAAQABP8zM/8z/zP/MzP/////M////yH5CiwheLrcLTBCd6Tv2qW16tdK4jhV
5qpraXIvM1JlNyAgOw==
@@ -1953,7 +1953,7 @@ test imgPhoto-18.1 {Reject corrupted GIF (binary string)} -setup {
} -cleanup {
catch {image delete gif1}
} -returnCodes error -result {error reading color map|not enough free memory for image buffer} -match regexp
-test imgPhoto-18.2 {Reject corrupted GIF (base 64 string)} -setup {
+test imgPhoto-20.2 {Reject corrupted GIF (base 64 string)} -setup {
set data {
R0lGODlhAAQABP8zM/8z/zP/MzP/////M////yH5CiwheLrcLTBCd6Tv2qW16tdK4jhV
5qpraXIvM1JlNyAgOw==
@@ -1963,14 +1963,14 @@ test imgPhoto-18.2 {Reject corrupted GIF (base 64 string)} -setup {
} -cleanup {
catch {image delete gif1}
} -returnCodes error -result {error reading color map|not enough free memory for image buffer} -match regexp
-test imgPhoto-18.3 {Reject corrupted GIF (file)} -setup {
+test imgPhoto-20.3 {Reject corrupted GIF (file)} -setup {
set fileName [file join [file dirname [info script]] corruptMangled.gif]
} -body {
image create photo gif1 -file $fileName
} -cleanup {
catch {image delete gif1}
} -returnCodes error -result {error reading color map|not enough free memory for image buffer} -match regexp
-test imgPhoto-18.4 {Reject truncated GIF (binary string)} -setup {
+test imgPhoto-20.4 {Reject truncated GIF (binary string)} -setup {
set data [binary decode base64 {
R0lGODlhEAAQAMIHAAAAADMz//8zM/8z/zP/MzP///8=
}]
@@ -1979,7 +1979,7 @@ test imgPhoto-18.4 {Reject truncated GIF (binary string)} -setup {
} -cleanup {
catch {image delete gif1}
} -returnCodes error -result {error reading color map}
-test imgPhoto-18.5 {Reject truncated GIF (base 64 string)} -setup {
+test imgPhoto-20.5 {Reject truncated GIF (base 64 string)} -setup {
set data {
R0lGODlhEAAQAMIHAAAAADMz//8zM/8z/zP/MzP///8=
}
@@ -1988,14 +1988,14 @@ test imgPhoto-18.5 {Reject truncated GIF (base 64 string)} -setup {
} -cleanup {
catch {image delete gif1}
} -returnCodes error -result {error reading color map}
-test imgPhoto-18.6 {Reject truncated GIF (file)} -setup {
+test imgPhoto-20.6 {Reject truncated GIF (file)} -setup {
set fileName [file join [file dirname [info script]] corruptTruncated.gif]
} -body {
image create photo gif1 -file $fileName
} -cleanup {
catch {image delete gif1}
} -returnCodes error -result {error reading color map}
-test imgPhoto-18.7 {Reject corrupted GIF (> 4Gb) (binary string)} -constraints {
+test imgPhoto-20.7 {Reject corrupted GIF (> 4Gb) (binary string)} -constraints {
nonPortable
} -setup {
# About the non portability constraint of this test: see ticket [cc42cc18a5]
@@ -2011,7 +2011,7 @@ test imgPhoto-18.7 {Reject corrupted GIF (> 4Gb) (binary string)} -constraints {
} -cleanup {
catch {image delete gif1}
} -returnCodes error -result {error reading color map|not enough free memory for image buffer} -match regexp
-test imgPhoto-18.8 {Reject corrupted GIF (> 4Gb) (base 64 string)} -constraints {
+test imgPhoto-20.8 {Reject corrupted GIF (> 4Gb) (base 64 string)} -constraints {
nonPortable
} -setup {
# About the non portability constraint of this test: see ticket [cc42cc18a5]
@@ -2027,7 +2027,7 @@ test imgPhoto-18.8 {Reject corrupted GIF (> 4Gb) (base 64 string)} -constraints
} -cleanup {
catch {image delete gif1}
} -returnCodes error -result {error reading color map|not enough free memory for image buffer} -match regexp
-test imgPhoto-18.9 {Reject corrupted GIF (> 4Gb) (file)} -constraints {
+test imgPhoto-20.9 {Reject corrupted GIF (> 4Gb) (file)} -constraints {
nonPortable
} -setup {
# About the non portability constraint of this test: see ticket [cc42cc18a5]
@@ -2040,10 +2040,10 @@ test imgPhoto-18.9 {Reject corrupted GIF (> 4Gb) (file)} -constraints {
} -cleanup {
catch {image delete gif1}
} -returnCodes error -result {error reading color map|not enough free memory for image buffer} -match regexp
-test imgPhoto-18.10 {Valid GIF (binary string)} -setup {
+test imgPhoto-20.10 {Valid GIF (binary string)} -setup {
# Test the binary string reader with a valid GIF.
# This is not tested elsewhere.
- # Tests 18.11, 18.12, with matching data, are included for completeness.
+ # Tests 20.11, 20.12, with matching data, are included for completeness.
set data [binary decode base64 {
R0lGODlhEAAQAMIHAAAAADMz//8zM/8z/zP/MzP/////M////yH5BAEKAAcALAAA
AAAQABAAAAMheLrcLTBCd6QV79qlterXB0riOFXmmapraXIvM1IdZTcJADs=
@@ -2053,7 +2053,7 @@ test imgPhoto-18.10 {Valid GIF (binary string)} -setup {
} -cleanup {
catch {image delete gif1}
} -result gif1
-test imgPhoto-18.11 {Valid GIF (base 64 string)} -setup {
+test imgPhoto-20.11 {Valid GIF (base 64 string)} -setup {
set data {
R0lGODlhEAAQAMIHAAAAADMz//8zM/8z/zP/MzP/////M////yH5BAEKAAcALAAA
AAAQABAAAAMheLrcLTBCd6QV79qlterXB0riOFXmmapraXIvM1IdZTcJADs=
@@ -2063,7 +2063,7 @@ test imgPhoto-18.11 {Valid GIF (base 64 string)} -setup {
} -cleanup {
catch {image delete gif1}
} -result gif1
-test imgPhoto-18.12 {Valid GIF (file)} -setup {
+test imgPhoto-20.12 {Valid GIF (file)} -setup {
set fileName [file join [file dirname [info script]] red.gif]
} -body {
image create photo gif1 -file $fileName
diff --git a/tests/listbox.test b/tests/listbox.test
index 3520f99..9b667cd 100644
--- a/tests/listbox.test
+++ b/tests/listbox.test
@@ -718,7 +718,7 @@ test listbox-3.60 {ListboxWidgetCmd procedure, "index" option} -body {
} -result 2
test listbox-3.61 {ListboxWidgetCmd procedure, "index" option} -body {
.l index -1
-} -result {-1}
+} -result -1
test listbox-3.62 {ListboxWidgetCmd procedure, "index" option} -body {
.l index end
} -result 18
@@ -2132,7 +2132,7 @@ test listbox-10.19 {GetListboxIndex procedure} -setup {
.l index -1
} -cleanup {
destroy .l
-} -result -1
+} -result -1
test listbox-10.20 {GetListboxIndex procedure} -setup {
destroy .l
} -body {
diff --git a/tests/menuDraw.test b/tests/menuDraw.test
index 9382974..bf15f25 100644
--- a/tests/menuDraw.test
+++ b/tests/menuDraw.test
@@ -561,7 +561,7 @@ test menuDraw-15.2 {TkPostTearoffMenu - Deactivation} -setup {
$tearoff index active
} -cleanup {
deleteWindows
-} -result {none}
+} -result none
test menuDraw-15.3 {TkPostTearoffMenu - post command} -setup {
deleteWindows
} -body {
diff --git a/tests/scale.test b/tests/scale.test
index 2c3a8c2..18b78f8 100644
--- a/tests/scale.test
+++ b/tests/scale.test
@@ -1135,26 +1135,26 @@ test scale-14.5 {RoundValueToResolution procedure} -body {
-orient horizontal -resolution 4.0
update
.s get 84 152
-} -result {-28}
+} -result -28
test scale-14.6 {RoundValueToResolution procedure} -body {
.s configure -from -100 -to 0 -sliderlength 10 -length 114 -bd 2 \
-orient horizontal -resolution 4.0
update
.s get 86 152
-} -result {-24}
+} -result -24
test scale-14.7 {RoundValueToResolution procedure} -body {
.s configure -from 0 -to -100 -sliderlength 10 -length 114 -bd 2 \
-orient horizontal -resolution 4.0
update
.s get 84 152
-} -result {-72}
+} -result -72
test scale-14.8 {RoundValueToResolution procedure} -body {
.s configure -from 0 -to -100 -sliderlength 10 -length 114 -bd 2 \
-orient horizontal -resolution 4.0
update
.s get 86 152
-} -result {-76}
+} -result -76
test scale-14.9 {RoundValueToResolution procedure} -body {
.s configure -from 0 -to 2.25 -sliderlength 10 -length 114 -bd 2 \
@@ -1226,7 +1226,7 @@ test scale-15.1 {ScaleVarProc procedure} -setup {
scale .s -from 0 -to -200 -variable y -orient horizontal -length 150
pack .s
return $y
-} -result {-130}
+} -result -130
test scale-15.2 {ScaleVarProc procedure} -setup {
deleteWindows
} -body {
@@ -1235,7 +1235,7 @@ test scale-15.2 {ScaleVarProc procedure} -setup {
pack .s
set y -87
.s get
-} -result {-87}
+} -result -87
test scale-15.3 {ScaleVarProc procedure} -setup {
deleteWindows
} -body {
@@ -1256,7 +1256,7 @@ test scale-15.4 {ScaleVarProc procedure} -setup {
.s get
} -cleanup {
deleteWindows
-} -result {-130}
+} -result -130
test scale-15.5 {ScaleVarProc procedure} -setup {
deleteWindows
} -body {
diff --git a/tests/scrollbar.test b/tests/scrollbar.test
index 873e564..ea34f1d 100644
--- a/tests/scrollbar.test
+++ b/tests/scrollbar.test
@@ -341,7 +341,7 @@ test scrollbar-3.49 {ScrollbarWidgetCmd procedure, "identify" option} {
test scrollbar-3.50.1 {ScrollbarWidgetCmd procedure, "identify" option} notAqua {
.s identify 5 5
} {arrow1}
-test scrollbar-3.50.1 {ScrollbarWidgetCmd procedure, "identify" option} aqua {
+test scrollbar-3.50.2 {ScrollbarWidgetCmd procedure, "identify" option} aqua {
# macOS scrollbars have no arrows nowadays
.s identify 5 5
} {trough1}
diff --git a/tests/spinbox.test b/tests/spinbox.test
index e3c7009..070337d 100644
--- a/tests/spinbox.test
+++ b/tests/spinbox.test
@@ -714,7 +714,7 @@ test spinbox-1.61 {configuration option: "repeatinterval"} -setup {
.e cget -repeatinterval
} -cleanup {
destroy .e
-} -result {-500}
+} -result -500
test spinbox-1.62 {configuration option: "repeatinterval" for spinbox} -setup {
spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \
-relief sunken
diff --git a/tests/text.test b/tests/text.test
index b34f6dd..3802746 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -1252,7 +1252,7 @@ bOy GIrl .#@? x_yz
Line 7"
.t configure -state disabled
.t delete 2.3
- .t g 2.0 2.end
+ .t get 2.0 2.end
} -cleanup {
destroy .t
} -result {abcdefghijklm}
@@ -2103,7 +2103,7 @@ Line 7"
.t count 5.7 5.3
} -cleanup {
destroy .t
-} -result {-4}
+} -result -4
test text-10.7 {TextWidgetCmd procedure, "count" option} -setup {
text .t
.t insert 1.0 "Line 1
@@ -2598,7 +2598,7 @@ test text-10.31 {TextWidgetCmd procedure, "count" option} -setup {
.t count -lines end 1.0
} -cleanup {
destroy .t
-} -result {-3}
+} -result -3
test text-10.32 {TextWidgetCmd procedure, "count" option} -setup {
text .t
} -body {
@@ -2648,7 +2648,7 @@ test text-10.36 {TextWidgetCmd procedure, "count" option} -setup {
.t count -lines 2.7 "1.0 lineend"
} -cleanup {
destroy .t
-} -result {-1}
+} -result -1
test text-10.37 {TextWidgetCmd procedure, "count" option} -setup {
text .t
} -body {
@@ -2691,7 +2691,7 @@ test text-10.39 {TextWidgetCmd procedure, "count" option} -setup {
} -cleanup {
destroy .t
} -result {2 6 1 5}
-test text-9.2.45 {TextWidgetCmd procedure, "count" option} -setup {
+test text-10.40 {TextWidgetCmd procedure, "count" option} -setup {
text .t
pack .t
update
@@ -2707,7 +2707,7 @@ test text-9.2.45 {TextWidgetCmd procedure, "count" option} -setup {
} -cleanup {
destroy .t
} -result 0
-test text-9.2.46 {TextWidgetCmd procedure, "count" option} -setup {
+test text-10.41 {TextWidgetCmd procedure, "count" option} -setup {
toplevel .mytop
pack [text .mytop.t -font TkFixedFont -bd 0 -padx 0 -wrap char]
set spec [font measure TkFixedFont "Line 1+++Line 1---Li"] ; # 20 chars
@@ -2729,7 +2729,7 @@ test text-9.2.46 {TextWidgetCmd procedure, "count" option} -setup {
} -cleanup {
destroy .mytop
} -result {1 3}
-test text-9.2.47 {TextWidgetCmd procedure, "count" option} -setup {
+test text-10.42 {TextWidgetCmd procedure, "count" option} -setup {
text .t
pack .t
update
@@ -6759,7 +6759,7 @@ test text-27.15g {No <<Selection>> virtual event on <<Cut>> without widget selec
destroy .t
} -result {no_<<Selection>>_event_fired}
test text-27.16 {-maxundo configuration option} -body {
- text .t -undo 1 -autoseparators 1 -maxundo 2
+ text .t -undo 1 -autoseparators 1 -maxundo 2
pack .t
.t insert end "line 1\n"
.t delete 1.4 1.6
@@ -7540,100 +7540,6 @@ test text-32.4 {peer widget -start, -endline and deletion (bug 1630262)} -setup
destroy .pt .t
} -result {5 11 8 10 5 8 6 8 22 27 38 44 55 60 57 57}
-test text-32.2 {peer widget -start, -endline and deletion (bug 1630262)} -setup {
- destroy .t .pt
- set res {}
-} -body {
- text .t
- .t peer create .pt
- for {set i 1} {$i < 100} {incr i} {
- .t insert end "Line $i\n"
- }
- .t configure -startline 5
- # none of the following delete shall crash
- # (all did before fixing bug 1630262)
- # 1. delete on the same line: line1 == line2 in DeleteIndexRange,
- # and resetView is true neither for .t not for .pt
- .pt delete 2.0 2.2
- # 2. delete just one line: line1 < line2 in DeleteIndexRange,
- # and resetView is true only for .t, not for .pt
- .pt delete 2.0 3.0
- # 3. delete several lines: line1 < line2 in DeleteIndexRange,
- # and resetView is true only for .t, not for .pt
- .pt delete 2.0 5.0
- # 4. delete to the end line: line1 < line2 in DeleteIndexRange,
- # and resetView is true only for .t, not for .pt
- .pt delete 2.0 end
- # this test succeeds provided there is no crash
- set res 1
-} -cleanup {
- destroy .pt
-} -result 1
-
-test text-32.3 {peer widget -start, -endline and deletion (bug 1630262)} -setup {
- destroy .t .pt
- set res {}
-} -body {
- text .t
- .t peer create .pt
- for {set i 1} {$i < 100} {incr i} {
- .t insert end "Line $i\n"
- }
- .t configure -startline 5
- .pt configure -startline 3
- # the following delete shall not crash
- # (it did before fixing bug 1630262)
- .pt delete 2.0 3.0
- # moreover -startline shall be correct
- # (was wrong before fixing bug 1630262)
- lappend res [.t cget -start] [.pt cget -start]
-} -cleanup {
- destroy .pt
-} -result {4 3}
-
-test text-32.4 {peer widget -start, -endline and deletion (bug 1630262)} -setup {
- destroy .t .pt
- set res {}
-} -body {
- text .t
- .t peer create .pt
- for {set i 1} {$i < 100} {incr i} {
- .t insert end "Line $i\n"
- }
- .t configure -startline 5 -endline 15
- .pt configure -startline 8 -endline 12
- # .pt now shows a range entirely inside the range of .pt
- # from .t, delete lines located after [.pt cget -end]
- .t delete 9.0 10.0
- # from .t, delete lines straddling [.pt cget -end]
- .t delete 6.0 9.0
- lappend res [.t cget -start] [.t cget -end] [.pt cget -start] [.pt cget -end]
- .t configure -startline 5 -endline 12
- .pt configure -startline 8 -endline 12
- # .pt now shows again a range entirely inside the range of .pt
- # from .t, delete lines located before [.pt cget -start]
- .t delete 2.0 3.0
- # from .t, delete lines straddling [.pt cget -start]
- .t delete 2.0 5.0
- lappend res [.t cget -start] [.t cget -end] [.pt cget -start] [.pt cget -end]
- .t configure -startline 22 -endline 31
- .pt configure -startline 42 -endline 51
- # .t now shows a range entirely before the range of .pt
- # from .t, delete some lines, then do it from .pt
- .t delete 2.0 3.0
- .t delete 2.0 5.0
- .pt delete 2.0 5.0
- lappend res [.t cget -start] [.t cget -end] [.pt cget -start] [.pt cget -end]
- .t configure -startline 55 -endline 75
- .pt configure -startline 60 -endline 70
- # .pt now shows a range entirely inside the range of .t
- # from .t, delete a range straddling the entire range of .pt
- .t delete 3.0 18.0
- lappend res [.t cget -start] [.t cget -end] [.pt cget -start] [.pt cget -end]
-} -cleanup {
- destroy .pt .t
-} -result {5 11 8 10 5 8 6 8 22 27 38 44 55 60 57 57}
-
test text-33.1 {TextWidgetCmd procedure, "peer" option} -setup {
text .t
@@ -7652,7 +7558,7 @@ test text-33.2 {TextWidgetCmd procedure, "peer" option} -setup {
test text-33.3 {TextWidgetCmd procedure, "peer" option} -setup {
text .t
} -body {
- .t pee names
+ .t peer names
} -cleanup {
destroy .t
} -returnCodes {ok} -result {}
@@ -7768,7 +7674,6 @@ test text-34.1 {peer widget -start, -endline and selection} -setup {
test text-35.1 {widget dump -command alters tags} -setup {
proc Dumpy {key value index} {
-#puts "KK: $key, $value"
.t tag add $value [list $index linestart] [list $index lineend]
}
text .t
@@ -7782,7 +7687,6 @@ test text-35.1 {widget dump -command alters tags} -setup {
} -result {ok}
test text-35.2 {widget dump -command makes massive changes} -setup {
proc Dumpy {key value index} {
-#puts "KK: $key, $value"
.t delete 1.0 end
}
text .t
@@ -7796,7 +7700,6 @@ test text-35.2 {widget dump -command makes massive changes} -setup {
} -result {ok}
test text-35.3 {widget dump -command destroys widget} -setup {
proc Dumpy {key value index} {
-#puts "KK: $key, $value"
destroy .t
}
text .t
diff --git a/tests/textDisp.test b/tests/textDisp.test
index aeb1a70..b797715 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -1346,11 +1346,11 @@ test textDisp-9.10 {TkTextRedrawTag} {
.t insert 1.0 "Line 1\nLine 2 is long enough to wrap\nLine 3 is also long enough to wrap\nLine 4"
.t tag add big 1.0 2.0
updateText
- set tk_textRedraw {none}
+ set tk_textRedraw none
.t tag add big 1.3 1.5
updateText
set tk_textRedraw
-} {none}
+} none
test textDisp-9.11 {TkTextRedrawTag} {
.t configure -wrap char
.t delete 1.0 end
@@ -2499,8 +2499,6 @@ test textDisp-18.8 {GetXView procedure} {
catch {rename bgerror {}}
catch {rename bogus {}}
.t configure -xscrollcommand {} -yscrollcommand scroll
-
-.t configure -xscrollcommand {} -yscrollcommand scroll
test textDisp-19.1 {GetYView procedure} {
.t configure -wrap char
.t delete 1.0 end
@@ -3005,7 +3003,7 @@ set res [.tt.u count -displaylines 3.10 2.173]
destroy .tt
unset message
set res
-} {-1}
+} -1
.t delete 1.0 end
.t insert end "Line 1"
diff --git a/tests/textWind.test b/tests/textWind.test
index 82d3269..4da56e5 100644
--- a/tests/textWind.test
+++ b/tests/textWind.test
@@ -860,7 +860,7 @@ test textWind-10.10 {EmbWinLayoutProc procedure, doesn't fit on line} -setup {
} -body {
.t configure -wrap char
.t insert 1.0 "Some sample text"
- frame .f -width 125 -height 20 -bg $color -bd 2 -relief raised
+ frame .f -width [expr {($tWidth-12)*$fixedWidth-1}] -height 20 -bg $color -bd 2 -relief raised
.t window create 1.12 -window .f
list [.t bbox .f] [.t bbox 1.13]
} -cleanup {
@@ -875,7 +875,7 @@ test textWind-10.11 {EmbWinLayoutProc procedure, doesn't fit on line} -setup {
} -body {
.t configure -wrap char
.t insert 1.0 "Some sample text"
- frame .f -width 126 -height 20 -bg $color -bd 2 -relief raised
+ frame .f -width [expr {($tWidth-12)*$fixedWidth}] -height 20 -bg $color -bd 2 -relief raised
.t window create 1.12 -window .f
update
list [.t bbox .f] [.t bbox 1.13]
@@ -891,15 +891,15 @@ test textWind-10.12 {EmbWinLayoutProc procedure, doesn't fit on line} -setup {
} -body {
.t configure -wrap char
.t insert 1.0 "Some sample text"
- frame .f -width 127 -height 20 -bg $color -bd 2 -relief raised
+ frame .f -width [expr {($tWidth-12)*$fixedWidth+1}] -height 20 -bg $color -bd 2 -relief raised
.t window create 1.12 -window .f
update
list [.t bbox .f] [.t bbox 1.13]
} -cleanup {
destroy .f
} -result [list \
- [list $padx [expr {$pady+$fixedHeight}] 127 20] \
- [list [expr {$padx+127}] [expr {$pady+$fixedHeight+((20-$fixedHeight)/2)}] $fixedWidth $fixedHeight]]
+ [list $padx [expr {$pady+$fixedHeight}] [expr {($tWidth-12)*$fixedWidth+1}] 20] \
+ [list [expr {$padx+($tWidth-12)*$fixedWidth+1}] [expr {$pady+$fixedHeight+((20-$fixedHeight)/2)}] $fixedWidth $fixedHeight]]
test textWind-10.13 {EmbWinLayoutProc procedure, doesn't fit on line} -setup {
.t delete 1.0 end
@@ -907,7 +907,7 @@ test textWind-10.13 {EmbWinLayoutProc procedure, doesn't fit on line} -setup {
} -body {
.t configure -wrap none
.t insert 1.0 "Some sample text"
- frame .f -width 130 -height 20 -bg $color -bd 2 -relief raised
+ frame .f -width [expr {($tWidth-12)*$fixedWidth+5}] -height 20 -bg $color -bd 2 -relief raised
.t window create 1.12 -window .f
update
list [.t bbox .f] [.t bbox 1.13]
@@ -923,7 +923,7 @@ test textWind-10.14 {EmbWinLayoutProc procedure, doesn't fit on line} -setup {
} -body {
.t configure -wrap none
.t insert 1.0 "Some sample text"
- frame .f -width 130 -height 220 -bg $color -bd 2 -relief raised
+ frame .f -width [expr {($tWidth-12)*$fixedWidth+5}] -height 220 -bg $color -bd 2 -relief raised
.t window create 1.12 -window .f
update
list [.t bbox .f] [.t bbox 1.13]
diff --git a/tests/ttk/entry.test b/tests/ttk/entry.test
index a2d6016..f3174ae 100644
--- a/tests/ttk/entry.test
+++ b/tests/ttk/entry.test
@@ -342,6 +342,18 @@ test entry-10.2 {configuration option: "-placeholderforeground"} -setup {
destroy .e
} -result {red}
+test entry-10.3 {styling option: "-placeholderforeground"} -setup {
+ pack [ttk::entry .e]
+} -body {
+ set current [ttk::style configure TEntry -placeholderforeground]
+ ttk::style configure TEntry -placeholderforeground blue
+ set res [ttk::style configure TEntry -placeholderforeground]
+ ttk::style configure TEntry -placeholderforeground $current
+ set res
+} -cleanup {
+ destroy .e
+} -result {blue}
+
test entry-11.1 {Bug [2830360fff] - Don't loose invalid at focus events} -setup {
pack [ttk::entry .e]
update
diff --git a/tests/ttk/spinbox.test b/tests/ttk/spinbox.test
index 4bdabee..b5a9ab5 100644
--- a/tests/ttk/spinbox.test
+++ b/tests/ttk/spinbox.test
@@ -126,7 +126,7 @@ test spinbox-1.8.2 "option -validate" -setup {
.sb cget -validate
} -cleanup {
destroy .sb
-} -result {none}
+} -result none
test spinbox-1.8.3 "option -validate" -setup {
ttk::spinbox .sb -from 0 -to 100