diff options
author | fvogel <fvogelnew1@free.fr> | 2022-11-29 21:41:03 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2022-11-29 21:41:03 (GMT) |
commit | d53e6847035901db05851b62012a64c375c03669 (patch) | |
tree | 6a998adcfddf6f9599fcf3ebd00875e292800490 | |
parent | 1d9db21e6c8179d6b535f3dc448540dcb9a097fb (diff) | |
parent | 554d0aa0494b61453f72925c486910f879ab8d95 (diff) | |
download | tk-d53e6847035901db05851b62012a64c375c03669.zip tk-d53e6847035901db05851b62012a64c375c03669.tar.gz tk-d53e6847035901db05851b62012a64c375c03669.tar.bz2 |
Merge branch less_tests_constraints. text-23.*: Enlarge the width of the text widget to be sure there is enough room to display the tabbed text without wrapping. And camelcasing.
-rw-r--r-- | tests/text.test | 14 | ||||
-rw-r--r-- | tests/textDisp.test | 36 | ||||
-rw-r--r-- | tests/textTag.test | 8 |
3 files changed, 29 insertions, 29 deletions
diff --git a/tests/text.test b/tests/text.test index 2f5f1fc..43810cd 100644 --- a/tests/text.test +++ b/tests/text.test @@ -6098,7 +6098,7 @@ test text-22.250 {TextSearchCmd, backwards search all matching at start of line} } -result {1.1 1.0 1.0} test text-23.1 {TkTextGetTabs procedure} -setup { - text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 100 + text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 150 pack .t } -body { .t insert end "1\t2\t3\t4\t55.5" @@ -6107,7 +6107,7 @@ test text-23.1 {TkTextGetTabs procedure} -setup { destroy .t } -returnCodes {error} -result {unmatched open brace in list} test text-23.2 {TkTextGetTabs procedure} -setup { - text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 100 + text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 150 pack .t } -body { .t insert end "1\t2\t3\t4\t55.5" @@ -6116,7 +6116,7 @@ test text-23.2 {TkTextGetTabs procedure} -setup { destroy .t } -returnCodes {error} -result {bad screen distance "xyz"} test text-23.3 {TkTextGetTabs procedure} -setup { - text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 100 + text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 150 pack .t } -body { .t insert end "1\t2\t3\t4\t55.5" @@ -6127,7 +6127,7 @@ test text-23.3 {TkTextGetTabs procedure} -setup { destroy .t } -result {100 200} test text-23.4 {TkTextGetTabs procedure} -setup { - text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 100 + text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 150 pack .t } -body { .t insert end "1\t2\t3\t4\t55.5" @@ -6141,7 +6141,7 @@ test text-23.4 {TkTextGetTabs procedure} -setup { destroy .t } -result {100 200 300 400} test text-23.5 {TkTextGetTabs procedure} -setup { - text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 100 + text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 150 pack .t } -body { .t insert end "1\t2\t3\t4\t55.5" @@ -6155,7 +6155,7 @@ test text-23.5 {TkTextGetTabs procedure} -setup { destroy .t } -result {105 205 305 405} test text-23.6 {TkTextGetTabs procedure} -setup { - text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 100 + text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 150 pack .t } -body { .t insert end "1\t2\t3\t4\t55.5" @@ -6164,7 +6164,7 @@ test text-23.6 {TkTextGetTabs procedure} -setup { destroy .t } -returnCodes {error} -result {bad tab alignment "lork": must be left, right, center, or numeric} test text-23.7 {TkTextGetTabs procedure} -setup { - text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 100 + text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 150 pack .t } -body { .t insert end "1\t2\t3\t4\t55.5" diff --git a/tests/textDisp.test b/tests/textDisp.test index 87ccb43..5627d86 100644 --- a/tests/textDisp.test +++ b/tests/textDisp.test @@ -78,7 +78,7 @@ set bigAscent [font metrics $bigFont -ascent] # This is because this configuration only has ONE single font available, # making all requested fonts become actually the same font. # See constraints.tcl for more details. -testConstraint havebigFontTwiceLargerThanTextFont [expr { +testConstraint haveBigFontTwiceLargerThanTextFont [expr { [font actual $fixedFont -size] * 2 <= [font actual $bigFont -size] }] @@ -652,7 +652,7 @@ test textDisp-2.30 {LayoutDLine, tabs, running out of space in dline} { .t bbox 1.4 } [list [xchar [expr {2*8}]] [yline 1] $fixedWidth $fixedHeight] -test textDisp-3.1 {different character sizes} havebigFontTwiceLargerThanTextFont { +test textDisp-3.1 {different character sizes} haveBigFontTwiceLargerThanTextFont { .t configure -wrap word .t delete 1.0 end .t insert end "Some sample text, including both large\n" @@ -1326,7 +1326,7 @@ test textDisp-8.9 {TkTextChanged} { update list $tk_textRelayout $tk_textRedraw } {{2.0 8.0} {2.0 8.0}} -test textDisp-8.10 {TkTextChanged} havebigFontTwiceLargerThanTextFont { +test textDisp-8.10 {TkTextChanged} haveBigFontTwiceLargerThanTextFont { .t configure -wrap char .t delete 1.0 end .t insert 1.0 "Line 1\nLine 2 is long enough to wrap\nLine 3 is also long enough to wrap\nLine 4" @@ -1387,7 +1387,7 @@ test textDisp-8.13 {TkTextChanged, used to crash, see [06c1433906]} { } {} test textDisp-9.1 {TkTextRedrawTag} -constraints { - havebigFontTwiceLargerThanTextFont + haveBigFontTwiceLargerThanTextFont } -body { .t configure -wrap char .t delete 1.0 end @@ -1400,7 +1400,7 @@ test textDisp-9.1 {TkTextRedrawTag} -constraints { # while still testing what we want to test } -match glob -result {{2.0 2.1[78]} {2.0 2.1[78]}} test textDisp-9.2 {TkTextRedrawTag} -constraints { - havebigFontTwiceLargerThanTextFont + haveBigFontTwiceLargerThanTextFont } -body { .t configure -wrap char .t delete 1.0 end @@ -1412,7 +1412,7 @@ test textDisp-9.2 {TkTextRedrawTag} -constraints { # glob matching is to have some tolerance on actually used font size # while still testing what we want to test } -match glob -result {{1.0 2.0 2.1[678]} {1.0 2.0 2.1[678]}} -test textDisp-9.3 {TkTextRedrawTag} havebigFontTwiceLargerThanTextFont { +test textDisp-9.3 {TkTextRedrawTag} haveBigFontTwiceLargerThanTextFont { .t configure -wrap char .t delete 1.0 end .t insert 1.0 "Line 1\nLine 2 is long enough to wrap around\nLine 3\nLine 4" @@ -1423,7 +1423,7 @@ test textDisp-9.3 {TkTextRedrawTag} havebigFontTwiceLargerThanTextFont { update list $tk_textRelayout $tk_textRedraw } {{2.0 2.20} {2.0 2.20 eof}} -test textDisp-9.4 {TkTextRedrawTag} havebigFontTwiceLargerThanTextFont { +test textDisp-9.4 {TkTextRedrawTag} haveBigFontTwiceLargerThanTextFont { .t configure -wrap char .t delete 1.0 end .t insert 1.0 "Line 1\nLine 2 is long enough to wrap around\nLine 3\nLine 4" @@ -1435,7 +1435,7 @@ test textDisp-9.4 {TkTextRedrawTag} havebigFontTwiceLargerThanTextFont { list $tk_textRelayout $tk_textRedraw } {{2.0 2.20} {2.0 2.20 eof}} test textDisp-9.5 {TkTextRedrawTag} -constraints { - havebigFontTwiceLargerThanTextFont + haveBigFontTwiceLargerThanTextFont } -setup { .t configure -wrap char -height [expr {[.t cget -height]+10}] } -body { @@ -1451,7 +1451,7 @@ test textDisp-9.5 {TkTextRedrawTag} -constraints { .t configure -height [expr {[.t cget -height]-10}] update } -result {{2.0 2.20} {2.0 2.20 eof}} -test textDisp-9.6 {TkTextRedrawTag} havebigFontTwiceLargerThanTextFont { +test textDisp-9.6 {TkTextRedrawTag} haveBigFontTwiceLargerThanTextFont { .t configure -wrap char .t delete 1.0 end .t insert 1.0 "Line 1\nLine 2 is long enough to wrap\nLine 3 is also long enough to wrap" @@ -1462,7 +1462,7 @@ test textDisp-9.6 {TkTextRedrawTag} havebigFontTwiceLargerThanTextFont { update list $tk_textRelayout $tk_textRedraw } {{2.0 2.20 3.0 3.20} {2.0 2.20 3.0 3.20 eof}} -test textDisp-9.7 {TkTextRedrawTag} havebigFontTwiceLargerThanTextFont { +test textDisp-9.7 {TkTextRedrawTag} haveBigFontTwiceLargerThanTextFont { .t configure -wrap char .t delete 1.0 end .t insert 1.0 "Line 1\nLine 2 is long enough to wrap\nLine 3 is also long enough to wrap\nLine 4" @@ -1473,7 +1473,7 @@ test textDisp-9.7 {TkTextRedrawTag} havebigFontTwiceLargerThanTextFont { set tk_textRedraw } {2.0 2.20 eof} test textDisp-9.8 {TkTextRedrawTag} -constraints { - havebigFontTwiceLargerThanTextFont + haveBigFontTwiceLargerThanTextFont } -body { .t configure -wrap char .t delete 1.0 end @@ -1487,7 +1487,7 @@ test textDisp-9.8 {TkTextRedrawTag} -constraints { # while still testing what we want to test } -match glob -result {2.0 2.1[678]} test textDisp-9.9 {TkTextRedrawTag} -constraints { - havebigFontTwiceLargerThanTextFont + haveBigFontTwiceLargerThanTextFont } -body { .t configure -wrap char .t delete 1.0 end @@ -1500,7 +1500,7 @@ test textDisp-9.9 {TkTextRedrawTag} -constraints { # glob matching is to have some tolerance on actually used font size # while still testing what we want to test } -match glob -result {2.0 2.1[678]} -test textDisp-9.10 {TkTextRedrawTag} havebigFontTwiceLargerThanTextFont { +test textDisp-9.10 {TkTextRedrawTag} haveBigFontTwiceLargerThanTextFont { .t configure -wrap char .t delete 1.0 end .t insert 1.0 "Line 1\nLine 2 is long enough to wrap\nLine 3 is also long enough to wrap\nLine 4" @@ -1511,7 +1511,7 @@ test textDisp-9.10 {TkTextRedrawTag} havebigFontTwiceLargerThanTextFont { update set tk_textRedraw } none -test textDisp-9.11 {TkTextRedrawTag} havebigFontTwiceLargerThanTextFont { +test textDisp-9.11 {TkTextRedrawTag} haveBigFontTwiceLargerThanTextFont { .t configure -wrap char .t delete 1.0 end .t insert 1.0 "Line 1\nLine 2 is long enough to wrap\nLine 3 is also long enough to wrap\nLine 4" @@ -2267,7 +2267,7 @@ test textDisp-16.9 {TkTextYviewCmd procedure, "moveto" option} { test textDisp-16.10 {TkTextYviewCmd procedure, "moveto" option} { list [catch {.t yview moveto gorp} msg] $msg } {1 {expected floating-point number but got "gorp"}} -test textDisp-16.11 {TkTextYviewCmd procedure, "moveto" option} havebigFontTwiceLargerThanTextFont { +test textDisp-16.11 {TkTextYviewCmd procedure, "moveto" option} haveBigFontTwiceLargerThanTextFont { # constrained because text tagged with the big font plays a role .t yview moveto 0.5 .t index @0,0 @@ -2323,7 +2323,7 @@ test textDisp-16.16 {TkTextYviewCmd procedure, "moveto" option} { } lequal [.t index @0,0] $expected } {1} -test textDisp-16.17 {TkTextYviewCmd procedure, "moveto" option} havebigFontTwiceLargerThanTextFont { +test textDisp-16.17 {TkTextYviewCmd procedure, "moveto" option} haveBigFontTwiceLargerThanTextFont { # constrained because text tagged with the big font plays a role .t yview moveto .755 .t index @0,0 @@ -3373,7 +3373,7 @@ test textDisp-22.5 {TkTextCharBbox, cut-off char} { update .t bbox 15.6 } [list [xchar 6] [yline 6] $fixedWidth $fixedHeight] -test textDisp-22.6 {TkTextCharBbox, line visible but not char} havebigFontTwiceLargerThanTextFont { +test textDisp-22.6 {TkTextCharBbox, line visible but not char} haveBigFontTwiceLargerThanTextFont { wm geometry . {} update scan [wm geom .] %dx%d oriWidth oriHeight @@ -3389,7 +3389,7 @@ test textDisp-22.6 {TkTextCharBbox, line visible but not char} havebigFontTwiceL } {1} wm geom . {} update -test textDisp-22.7 {TkTextCharBbox, different character sizes} havebigFontTwiceLargerThanTextFont { +test textDisp-22.7 {TkTextCharBbox, different character sizes} haveBigFontTwiceLargerThanTextFont { .t config -wrap char .t yview 10.0 .t tag add big 12.2 12.5 diff --git a/tests/textTag.test b/tests/textTag.test index 8a3b467..b8ec899 100644 --- a/tests/textTag.test +++ b/tests/textTag.test @@ -19,7 +19,7 @@ set bigFont {Helvetica 24} # This is because this configuration only has ONE single font available, # making all requested fonts become actually the same font. # See constraints.tcl for more details. -testConstraint havebigFontTwiceLargerThanTextFont [expr { +testConstraint haveBigFontTwiceLargerThanTextFont [expr { [font actual $fixedFont -size] * 2 <= [font actual $bigFont -size] }] @@ -1358,7 +1358,7 @@ test textTag-16.1 {TkTextPickCurrent procedure} -setup { } -result {2.1 3.2 3.2 3.2 3.2 3.2 4.3} test textTag-16.2 {TkTextPickCurrent procedure} -constraints { - havebigFontTwiceLargerThanTextFont + haveBigFontTwiceLargerThanTextFont } -setup { .t tag delete {*}[.t tag names] wm geometry . +200+200 ; update @@ -1454,7 +1454,7 @@ test textTag-16.5 {TkTextPickCurrent procedure} -setup { } -result {3.2} test textTag-16.6 {TkTextPickCurrent procedure} -constraints { - havebigFontTwiceLargerThanTextFont + haveBigFontTwiceLargerThanTextFont } -setup { foreach i {big a b c d} { .t tag remove $i 1.0 end @@ -1475,7 +1475,7 @@ test textTag-16.6 {TkTextPickCurrent procedure} -constraints { } -result {3.1} test textTag-16.7 {TkTextPickCurrent procedure} -constraints { - havebigFontTwiceLargerThanTextFont + haveBigFontTwiceLargerThanTextFont } -setup { foreach i {big a b c d} { .t tag remove $i 1.0 end |