Skip to content

Commit 2c26046

Browse files
committed
ttk/entry.test: convert improper test "entry-3.0" to a proper COMMON TEST SETUP section
1 parent d09f2b9 commit 2c26046

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

tests/ttk/entry.test

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,24 @@ test entry-2.2 "Initial scroll position" -body {
122122
} -result {0.0 0.5}
123123
# NOTE: result can vary depending on font.
124124

125-
# Bounding box / scrolling tests.
126-
test entry-3.0 "Series 3 setup" -body {
127-
ttk::style theme use default
128-
variable fixed TkFixedFont
129-
variable cw [font measure $fixed a]
130-
variable ch [font metrics $fixed -linespace]
131-
variable bd 3 ;# border + padding + extra space for focus ring
132-
variable ux [font measure $fixed 乎]
133-
134-
pack [ttk::entry .e -font $fixed -width 20]
135-
update
136-
}
125+
#
126+
# COMMON TEST SETUP
127+
#
128+
# for tests entry-3.*
129+
#
130+
ttk::style theme use default
131+
variable fixed TkFixedFont
132+
variable cw [font measure $fixed a]
133+
variable ch [font metrics $fixed -linespace]
134+
variable bd 3 ;# border + padding + extra space for focus ring
135+
variable ux [font measure $fixed 乎]
136+
pack [ttk::entry .e -font $fixed -width 20]
137+
update
138+
139+
#
140+
# Test entry-3.0 has been removed in favour of the common test setup
141+
# for tests entry-3.0 above.
142+
#
137143

138144
test entry-3.1 "bbox widget command" -body {
139145
.e delete 0 end

0 commit comments

Comments
 (0)