diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-16 13:31:44 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-16 13:31:44 (GMT) |
commit | 366274267444686d4349c1e8acfd1d86f5574d09 (patch) | |
tree | 6b8efc37c1d2b325058838397156b505c8fd2554 /tests/text.test | |
parent | 5385927e72f73a73d5f8a5e4eb0f033c18d2ad6c (diff) | |
download | tk-366274267444686d4349c1e8acfd1d86f5574d09.zip tk-366274267444686d4349c1e8acfd1d86f5574d09.tar.gz tk-366274267444686d4349c1e8acfd1d86f5574d09.tar.bz2 |
(cherry-pick): Require Tcltest 2.2 as a miminum. Run X11 testcases on Travis in 3 Ubuntu variants: Xenial, Bionic and Focal. (MacOS/XQuartz not working yet)
Diffstat (limited to 'tests/text.test')
-rw-r--r-- | tests/text.test | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/text.test b/tests/text.test index 2ca5d54..d06b8b3 100644 --- a/tests/text.test +++ b/tests/text.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. -package require tcltest 2.1 +package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands namespace import -force tcltest::test @@ -141,7 +141,7 @@ if {$tcl_platform(platform) == "windows"} { test text-2.5 {Tk_TextCmd procedure} { catch {destroy .t2} text .t2 - .t2 tag cget sel -relief + .t2 tag cget sel -relief } $relief test text-2.6 {Tk_TextCmd procedure} { catch {destroy .t2} @@ -535,7 +535,7 @@ test text-9.26 {TextWidgetCmd procedure, "get" option} { test text-9.26a {TextWidgetCmd procedure, "get" option} { list [.t index "5.6 -4a chars"] [.t index "5.8-4d chars"] } {5.1 5.1} -.t delete 5.4 +.t delete 5.4 .t tag add elide 5.5 5.6 test text-9.27 {TextWidgetCmd procedure, "get" option} { .t get -displaychars 5.2 5.8 @@ -880,7 +880,7 @@ test text-0.2.51 {counting with tag priority eliding} { 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"] @@ -1568,7 +1568,7 @@ test text-20.35a {TextSearchCmd procedure, regexp finds empty lines} { tk::TextSetCursor .t 4.0 .t search -forward -regexp {^$} insert end } {4.0} - + catch {destroy .t2} toplevel .t2 wm geometry .t2 +0+0 @@ -2037,7 +2037,7 @@ test text-20.105 {TextSearchCmd, multiline regexp matching} { deleteWindows pack [text .t2] .t2 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~_\]+)" @@ -2053,7 +2053,7 @@ test text-20.106 {TextSearchCmd, multiline regexp matching} { pack [text .t2] .t2 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~_\]+)" @@ -2066,7 +2066,7 @@ test text-20.107 {TextSearchCmd, multiline regexp matching} { .t2 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~_\]+)" @@ -3457,8 +3457,8 @@ test text-29.5 {peer widgets} { update ; update set p1 [.tt.t count -update -ypixels 1.0 end] set p2 [.t count -update -ypixels 5.0 11.0] - if {$p1 == $p2} { - set res "ok" + if {$p1 == $p2} { + set res "ok" } else { set res "$p1 and $p2 not equal" } @@ -3555,7 +3555,7 @@ test text-29.12 {peer widgets} { 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 set res {} lappend res [.t tag prevrange sel 1.0] .t configure -start 6 -end 12 @@ -3575,7 +3575,7 @@ test text-29.13 {peer widgets} { 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 set res {} .t configure -start 6 -end 12 lappend res [.t tag ranges sel] @@ -3594,7 +3594,7 @@ test text-29.14 {peer widgets} { 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 set res {} .t configure -start 6 -end 12 lappend res [.t tag ranges sel] @@ -3637,7 +3637,7 @@ test text-29.16 {peer widgets} { lappend res [.t index sel.last] destroy .t set res -} {1.0 11.0} +} {1.0 11.0} test text-29.17 {peer widgets} { destroy .t pack [text .t] @@ -3649,7 +3649,7 @@ test text-29.17 {peer widgets} { set res [list [catch {.t index sel.first} msg] $msg] destroy .t set res -} {1 {text doesn't contain any characters tagged with "sel"}} +} {1 {text doesn't contain any characters tagged with "sel"}} proc makeText {} { set w .g |