Import Tk 8.6.11

This commit is contained in:
Steve Dower
2021-03-30 00:54:10 +01:00
parent 42c69189d9
commit 070b8750b0
403 changed files with 21608 additions and 16269 deletions

View File

@@ -910,7 +910,7 @@ test text-2.7 {Tk_TextCmd procedure} -constraints {
} -body {
catch {destroy .t}
text .t
.t tag cget sel -relief
.t tag cget sel -relief
} -cleanup {
destroy .t
} -result {flat}
@@ -919,7 +919,7 @@ test text-2.8 {Tk_TextCmd procedure} -constraints {
} -body {
catch {destroy .t}
text .t
.t tag cget sel -relief
.t tag cget sel -relief
} -cleanup {
destroy .t
} -result {flat}
@@ -928,7 +928,7 @@ test text-2.9 {Tk_TextCmd procedure} -constraints {
} -body {
catch {destroy .t}
text .t
.t tag cget sel -relief
.t tag cget sel -relief
} -cleanup {
destroy .t
} -result {raised}
@@ -2035,7 +2035,7 @@ Line 7"
.t tag configure elide -elide 1
.t tag add elide 5.2 5.4
.t window create 5.4
.t delete 5.4
.t delete 5.4
.t tag add elide 5.5 5.6
.t get -displaychars 5.2 5.8
} -cleanup {
@@ -2917,7 +2917,7 @@ test text-11.9 {counting with tag priority eliding} -setup {
lappend res [.t index "1.0 +1 indices"]
lappend res [.t index "1.0 +1 display indices"]
lappend res [.t index "1.0 +1 display chars"]
lappend res [.t index end]
lappend res [.t index end]
lappend res [.t index "end -1 indices"]
lappend res [.t index "end -1 display indices"]
lappend res [.t index "end -1 display chars"]
@@ -3089,7 +3089,7 @@ test text-11a.41 {"sync" "pendingsync" and <<WidgetViewSync>>} -setup {
for {set i 1} {$i < 300} {incr i} {
append content [string repeat "$i " 50] \n
}
# Sync the widget and process all <<WidgetViewSync>> events before binding.
# Sync the widget and process all <<WidgetViewSync>> events before binding.
.top.yt sync
update
bind .top.yt <<WidgetViewSync>> {lappend res Sync:%d}
@@ -3120,7 +3120,7 @@ test text-11a.51 {<<WidgetViewSync>> calls TkSendVirtualEvent(),
pack [text .top.t]
update
for {set i 1} {$i < 10000} {incr i} {
.top.t insert end "Hello world!\n"
.top.t insert end "Hello world!\n"
}
bind .top.t <<WidgetViewSync>> {destroy .top.t}
.top.t tag add mytag 1.5 8000.8 ; # shall not crash
@@ -3323,11 +3323,11 @@ test text-14.5 {ConfigureText procedure} -setup {
.t configure -tabs {30 foo}
} -cleanup {
destroy .t
} -returnCodes {error} -result {bad tab alignment "foo": must be left, right, center, or numeric}
} -returnCodes {error} -result {bad tab alignment "foo": must be left, right, center, or numeric}
test text-14.6 {ConfigureText procedure} -setup {
text .t
} -body {
catch {.t configure -tabs {30 foo}}
catch {.t configure -tabs {30 foo}}
.t configure -tabs {10 20 30}
return $errorInfo
} -cleanup {
@@ -3346,7 +3346,7 @@ test text-14.7 {ConfigureText procedure} -setup {
destroy .t
} -result {}
test text-14.8 {ConfigureText procedure} -setup {
text .t
text .t
} -body {
.t configure -wrap bogus
} -cleanup {
@@ -3372,7 +3372,7 @@ test text-14.10 {ConfigureText procedure} -setup {
destroy .t
} -result {}
test text-14.11 {ConfigureText procedure} -setup {
text .t
text .t
} -body {
.t configure -selectborderwidth foo
} -cleanup {
@@ -3462,7 +3462,7 @@ test text-14.18 {ConfigureText procedure} -constraints fonts -setup {
toplevel .top
text .top.t -font {Courier -12} -borderwidth 2 -highlightthickness 2
} -body {
.top.t configure -width 20 -height 10
.top.t configure -width 20 -height 10
pack .top.t
update
set geom [wm geometry .top]
@@ -3476,7 +3476,7 @@ test text-14.18 {ConfigureText procedure} -constraints fonts -setup {
# to the appropriate size.
# On macOS, however, there is no way to make the window overlap the menubar.
if {[tk windowingsystem] == "aqua"} {
set minY 23
set minY [expr [menubarheight] + 1]
} else {
set minY 0
}
@@ -3558,7 +3558,7 @@ test text-17.1 {TextCmdDeletedProc procedure} -body {
test text-17.2 {TextCmdDeletedProc procedure, disabling -setgrid} -constraints {
fonts
} -body {
toplevel .top
toplevel .top
text .top.t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} \
-setgrid 1 -width 20 -height 10
pack .top.t
@@ -4950,7 +4950,7 @@ test text-22.118 {TextSearchCmd, multiline matching end of window} -body {
test text-22.119 {TextSearchCmd, multiline regexp matching} -body {
pack [text .t]
.t insert 1.0 { Tcl_Obj *objPtr));
static Tcl_Obj* FSNormalizeAbsolutePath
static Tcl_Obj* FSNormalizeAbsolutePath
_ANSI_ARGS_((Tcl_Interp* interp, Tcl_Obj *pathPtr));}
set markExpr "^(\[A-Za-z0-9~_\]+\[ \t\n\r\]*\\(|(\[^ \t\(#\n\r/@:\*\]\[^=\(\r\n\]*\[ \t\]+\\*?)?"
append markExpr "(\[A-Za-z0-9~_\]+(<\[^>\]*>)?(::)?(\[A-Za-z0-9~_\]+::)*\[-A-Za-z0-9~_+ <>\|\\*/\]+|\[A-Za-z0-9~_\]+)"
@@ -4967,7 +4967,7 @@ test text-22.120 {TextSearchCmd, multiline regexp matching} -body {
pack [text .t]
.t insert 1.0 {static int SetFsPathFromAny _ANSI_ARGS_((Tcl_Interp *interp,
Tcl_Obj *objPtr));
static Tcl_Obj* FSNormalizeAbsolutePath
static Tcl_Obj* FSNormalizeAbsolutePath
_ANSI_ARGS_((Tcl_Interp* interp, Tcl_Obj *pathPtr));}
set markExpr "^(\[A-Za-z0-9~_\]+\[ \t\n\r\]*\\(|(\[^ \t\(#\n\r/@:\*\]\[^=\(\r\n\]*\[ \t\]+\\*?)?"
append markExpr "(\[A-Za-z0-9~_\]+(<\[^>\]*>)?(::)?(\[A-Za-z0-9~_\]+::)*\[-A-Za-z0-9~_+ <>\|\\*/\]+|\[A-Za-z0-9~_\]+)"
@@ -4981,7 +4981,7 @@ test text-22.121 {TextSearchCmd, multiline regexp matching} -body {
.t insert 1.0 {
static int SetFsPathFromAny _ANSI_ARGS_((Tcl_Interp *interp,
Tcl_Obj *objPtr));
static Tcl_Obj* FSNormalizeAbsolutePath
static Tcl_Obj* FSNormalizeAbsolutePath
_ANSI_ARGS_((Tcl_Interp* interp, Tcl_Obj *pathPtr));}
set markExpr "^(\[A-Za-z0-9~_\]+\[ \t\n\r\]*\\(|(\[^ \t\(#\n\r/@:\*\]\[^=\(\r\n\]*\[ \t\]+\\*?)?"
append markExpr "(\[A-Za-z0-9~_\]+(<\[^>\]*>)?(::)?(\[A-Za-z0-9~_\]+::)*\[-A-Za-z0-9~_+ <>\|\\*/\]+|\[A-Za-z0-9~_\]+)"
@@ -5066,11 +5066,11 @@ test text-22.132 {TextSearchCmd, multiline regexp matching} -body {
void
Tcl_SetObjLength(objPtr, length)
register Tcl_Obj *objPtr; /* Pointer to object. This object must
* not currently be shared. */
register int length; /* Number of bytes desired for string
Tcl_Obj *objPtr; /* Pointer to object. This object must
* not currently be shared. */
int length; /* Number of bytes desired for string
* representation of object, not including
* terminating null byte. */
* terminating null byte. */
\{
char *new;
}
@@ -6177,7 +6177,7 @@ test text-23.7 {TkTextGetTabs procedure} -setup {
test text-24.1 {TextDumpCmd procedure, bad args} -body {
pack [text .t]
.t insert 1.0 "One Line"
.t mark set insert 1.0
.t mark set insert 1.0
.t dump
} -cleanup {
destroy .t
@@ -6185,7 +6185,7 @@ test text-24.1 {TextDumpCmd procedure, bad args} -body {
test text-24.2 {TextDumpCmd procedure, bad args} -body {
pack [text .t]
.t insert 1.0 "One Line"
.t mark set insert 1.0
.t mark set insert 1.0
.t dump -all
} -cleanup {
destroy .t
@@ -6193,7 +6193,7 @@ test text-24.2 {TextDumpCmd procedure, bad args} -body {
test text-24.3 {TextDumpCmd procedure, bad args} -body {
pack [text .t]
.t insert 1.0 "One Line"
.t mark set insert 1.0
.t mark set insert 1.0
.t dump -command
} -cleanup {
destroy .t
@@ -6201,7 +6201,7 @@ test text-24.3 {TextDumpCmd procedure, bad args} -body {
test text-24.4 {TextDumpCmd procedure, bad args} -body {
pack [text .t]
.t insert 1.0 "One Line"
.t mark set insert 1.0
.t mark set insert 1.0
.t dump -bogus
} -cleanup {
destroy .t
@@ -6209,7 +6209,7 @@ test text-24.4 {TextDumpCmd procedure, bad args} -body {
test text-24.5 {TextDumpCmd procedure, bad args} -body {
pack [text .t]
.t insert 1.0 "One Line"
.t mark set insert 1.0
.t mark set insert 1.0
.t dump bogus
} -cleanup {
destroy .t
@@ -6246,7 +6246,7 @@ test text-24.9 {TextDumpCmd procedure, same indices} -body {
test text-24.10 {TextDumpCmd procedure, negative range} -body {
pack [text .t]
.t insert 1.0 "One Line"
.t mark set insert 1.0
.t mark set insert 1.0
.t dump 1.5 1.0
} -cleanup {
destroy .t
@@ -6692,7 +6692,8 @@ test text-27.15d {<<Selection>> virtual event on <Delete> with cursor inside sel
update
set ::retval no_<<Selection>>_event_fired
.t mark set insert 1.15
focus .t
update idletasks
focus -force .t
event generate .t <Delete>
update
set ::retval
@@ -7236,7 +7237,7 @@ test text-31.14 {peer widgets} -setup {
for {set i 1} {$i < 20} {incr i} {
.t insert end "Line $i\n"
}
.t tag add sel 1.0 3.0 5.0 7.0 9.0 11.0 13.0 15.0 17.0 19.0
.t tag add sel 1.0 3.0 5.0 7.0 9.0 11.0 13.0 15.0 17.0 19.0
lappend res [.t tag prevrange sel 1.0]
.t configure -start 6 -end 12
lappend res [.t tag ranges sel]
@@ -7257,7 +7258,7 @@ test text-31.15 {peer widgets} -setup {
for {set i 1} {$i < 20} {incr i} {
.t insert end "Line $i\n"
}
.t tag add sel 1.0 3.0 9.0 11.0 13.0 15.0 17.0 19.0
.t tag add sel 1.0 3.0 9.0 11.0 13.0 15.0 17.0 19.0
.t configure -start 6 -end 12
lappend res [.t tag ranges sel]
lappend res "next" [.t tag nextrange sel 4.0] \
@@ -7277,7 +7278,7 @@ test text-31.16 {peer widgets} -setup {
for {set i 1} {$i < 20} {incr i} {
.t insert end "Line $i\n"
}
.t tag add sel 1.0 7.0 9.0 11.0 13.0 15.0 17.0 19.0
.t tag add sel 1.0 7.0 9.0 11.0 13.0 15.0 17.0 19.0
.t configure -start 6 -end 12
lappend res [.t tag ranges sel]
lappend res "next" [.t tag nextrange sel 4.0] \
@@ -7322,7 +7323,7 @@ test text-31.18 {peer widgets} -setup {
return $res
} -cleanup {
destroy .t
} -result {1.0 11.0}
} -result {1.0 11.0}
test text-31.19 {peer widgets} -body {
pack [text .t]
for {set i 1} {$i < 20} {incr i} {
@@ -7367,7 +7368,7 @@ test text-32.1 {line heights on creation} -setup {
update
set after [$w count -ypixels 1.0 2.0]
destroy .g
expr {$before eq $after}
expr {$before eq $after}
} -cleanup {
destroy .t
} -result {1}