summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/text.test195
1 files changed, 9 insertions, 186 deletions
diff --git a/tests/text.test b/tests/text.test
index 91fd703..b4e3954 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: text.test,v 1.44 2006/04/18 22:57:21 vincentdarley Exp $
+# RCS: @(#) $Id: text.test,v 1.45 2006/08/18 10:49:34 dkf Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -325,9 +325,7 @@ test text-8.16 {TextWidgetCmd procedure, "delete" option} {
.t delete 2.0 2.6 2.2 2.4
.t get 1.0 end-1c
} foo\nghijklm
-
.t delete 1.0 end; .t insert 1.0 $prevtext
-
test text-8.17 {TextWidgetCmd procedure, "replace" option} {
list [catch {.t replace 1.3 2.3} err] $err
} {1 {wrong # args: should be ".t replace index1 index2 chars ?tagList chars tagList ...?"}}
@@ -347,7 +345,6 @@ test text-8.20 {TextWidgetCmd procedure, "replace" option with undo} {
.t configure -undo 0
string equal [.t get 1.0 end-1c] $prevtext
} {1}
-
test text-8.21 {TextWidgetCmd procedure, "replace" option with undo} {
.t configure -undo 0
.t configure -undo 1
@@ -365,7 +362,6 @@ test text-8.21 {TextWidgetCmd procedure, "replace" option with undo} {
.t configure -undo 0
set res
} {{edit undo} {delete 2.1 2.4} {mark set insert 2.1} {see insert} {insert 2.1 ef} {mark set insert 2.3} {see insert}}
-
test text-8.22 {TextWidgetCmd procedure, "replace" option with undo} {
.t configure -undo 0
.t configure -undo 1
@@ -382,9 +378,7 @@ test text-8.22 {TextWidgetCmd procedure, "replace" option with undo} {
set res 1
}
} {1}
-
.t delete 1.0 end; .t insert 1.0 $prevtext
-
test text-8.23 {TextWidgetCmd procedure, "replace" option with peers, undo} {
.t configure -undo 0
.t configure -undo 1
@@ -404,9 +398,7 @@ test text-8.23 {TextWidgetCmd procedure, "replace" option with peers, undo} {
set res 1
}
} {1}
-
.t delete 1.0 end; .t insert 1.0 $prevtext
-
test text-8.24 {TextWidgetCmd procedure, "replace" option with peers, undo} {
.t configure -undo 0
.t configure -undo 1
@@ -979,7 +971,6 @@ test text-12.15 {ConfigureText procedure} {
test text-12.16 {ConfigureText procedure} {fonts} {
# This test is non-portable because the window size will vary depending
# on the font size, which can vary.
-
catch {destroy .t2}
toplevel .t2
text .t2.t -width 20 -height 10
@@ -993,7 +984,6 @@ test text-12.17 {ConfigureText procedure} {
# was a certain minimum size and it was interfering with the size
# requested by the -setgrid. The "overrideredirect" gets rid of the
# titlebar so the toplevel can shrink to the appropriate size.
-
catch {destroy .t2}
toplevel .t2
wm overrideredirect .t2 1
@@ -1008,7 +998,6 @@ test text-12.18 {ConfigureText procedure} {
# was a certain minimum size and it was interfering with the size
# requested by the -setgrid. The "overrideredirect" gets rid of the
# titlebar so the toplevel can shrink to the appropriate size.
-
catch {destroy .t2}
toplevel .t2
wm overrideredirect .t2 1
@@ -1625,7 +1614,6 @@ test text-20.62 {TextSearchCmd, freeing copy of pattern} {
# (actually in Tk 8.5 objectification means there is no
# longer a copy of the pattern, but we leave this test in
# anyway).
-
set p abcdefg1234567890
set p $p$p$p$p$p$p$p$p
set p $p$p$p$p$p
@@ -1651,7 +1639,6 @@ test text-20.65 {TextSearchCmd, unicode with non-text segments} {
destroy .b1
set result
} {1.3 3}
-
test text-20.66 {TextSearchCmd, hidden text does not affect match index} {
deleteWindows
pack [text .t2]
@@ -1680,7 +1667,6 @@ test text-20.69 {TextSearchCmd, hidden text does not affect match index} {
.t2 tag add hidden 2.0 3.0
.t2 search boo 1.0
} 3.3
-
test text-20.70 {TextSearchCmd, -regexp -nocase searches} {
catch {destroy .t}
pack [text .t]
@@ -1759,7 +1745,6 @@ test text-20.78 {TextSearchCmd, hidden text inside match must count in length} {
.t2 tag add hidden 1.2 1.4
list [.t2 search -regexp -count foo foar 1.3] $foo
} {1.0 6}
-
test text-20.78.1 {TextSearchCmd, hidden text inside match must count in length} {
deleteWindows
pack [text .t2]
@@ -1768,7 +1753,6 @@ test text-20.78.1 {TextSearchCmd, hidden text inside match must count in length}
.t2 tag add hidden 1.2 1.4
list [.t2 search -count foo foar 1.3] $foo
} {1.0 6}
-
test text-20.78.2 {TextSearchCmd, hidden text inside match must count in length} {
deleteWindows
pack [text .t2]
@@ -1777,7 +1761,6 @@ test text-20.78.2 {TextSearchCmd, hidden text inside match must count in length}
.t2 tag add hidden 1.2 1.4
.t2 search -strict -count foo foar 1.3
} {}
-
test text-20.78.3 {TextSearchCmd, hidden text inside match must count in length} {
deleteWindows
pack [text .t2]
@@ -1787,7 +1770,6 @@ test text-20.78.3 {TextSearchCmd, hidden text inside match must count in length}
.t2 tag add hidden 2.2 2.4
list [.t2 search -regexp -all -count foo foar 1.3] $foo
} {{2.0 3.0 1.0} {6 4 6}}
-
test text-20.78.4 {TextSearchCmd, hidden text inside match must count in length} {
deleteWindows
pack [text .t2]
@@ -1797,7 +1779,6 @@ test text-20.78.4 {TextSearchCmd, hidden text inside match must count in length}
.t2 tag add hidden 2.2 2.4
list [.t2 search -all -count foo foar 1.3] $foo
} {{2.0 3.0 1.0} {6 4 6}}
-
test text-20.78.5 {TextSearchCmd, hidden text inside match must count in length} {
deleteWindows
pack [text .t2]
@@ -1807,201 +1788,172 @@ test text-20.78.5 {TextSearchCmd, hidden text inside match must count in length}
.t2 tag add hidden 2.2 2.4
list [.t2 search -strict -all -count foo foar 1.3] $foo
} {{2.0 3.0} {6 4}}
-
test text-20.78.6 {TextSearchCmd, single line with -all} {
deleteWindows
pack [text .t2]
.t2 insert end " X\n X\n X\n X\n X\n X\n"
.t2 search -all -regexp { +| *\n} 1.0 end
} {1.0 1.2 2.0 2.2 3.0 3.2 4.0 4.2 5.0 5.2 6.0 6.2 7.0}
-
test text-20.79 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
list [.t2 search -count foo foobar\nfoo 1.0] $foo
} {1.0 10}
-
test text-20.80 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
list [.t2 search -count foo bar\nfoo 1.0] $foo
} {1.3 7}
-
test text-20.81 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
list [.t2 search -count foo \nfoo 1.0] $foo
} {1.6 4}
-
test text-20.82 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
list [.t2 search -count foo bar\nfoobar\nfoo 1.0] $foo
} {1.3 14}
-
test text-20.83 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
.t2 search -count foo bar\nfoobar\nfoobanearly 1.0
} {}
-
test text-20.84 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
list [.t2 search -regexp -count foo foobar\nfoo 1.0] $foo
} {1.0 10}
-
test text-20.85 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
list [.t2 search -regexp -count foo bar\nfoo 1.0] $foo
} {1.3 7}
-
test text-20.86 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
list [.t2 search -regexp -count foo \nfoo 1.0] $foo
} {1.6 4}
-
test text-20.87 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
list [.t2 search -regexp -count foo bar\nfoobar\nfoo 1.0] $foo
} {1.3 14}
-
test text-20.88 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
.t2 search -regexp -count foo bar\nfoobar\nfoobanearly 1.0
} {}
-
test text-20.89 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfaoobar\nfoobar"
.t2 search -regexp -count foo bar\nfoo 1.0
} {2.4}
-
test text-20.90 {TextSearchCmd, multiline matching end of window} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfaoobar\nfoobar"
.t2 search -regexp -count foo bar\nfoobar\n\n 1.0
} {}
-
test text-20.91 {TextSearchCmd, multiline matching end of window} {
deleteWindows
pack [text .t2]
.t2 search "\n\n" 1.0
} {}
-
test text-20.92 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
list [.t2 search -backwards -count foo foobar\nfoo end] $foo
} {2.0 10}
-
test text-20.93 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
list [.t2 search -backwards -count foo bar\nfoo 1.0] $foo
} {2.3 7}
-
test text-20.94 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
list [.t2 search -backwards -count foo \nfoo 1.0] $foo
} {2.6 4}
-
test text-20.95 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
list [.t2 search -backwards -count foo bar\nfoobar\nfoo 1.0] $foo
} {1.3 14}
-
test text-20.96 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
.t2 search -backwards -count foo bar\nfoobar\nfoobanearly 1.0
} {}
-
test text-20.97 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
list [.t2 search -backwards -regexp -count foo foobar\nfoo end] $foo
} {2.0 10}
-
test text-20.97.1 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
list [.t2 search -backwards -regexp -count foo foobar\nfo end] $foo
} {2.0 9}
-
test text-20.98 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
list [.t2 search -backwards -regexp -count foo bar\nfoo 1.0] $foo
} {2.3 7}
-
test text-20.99 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
list [.t2 search -backwards -regexp -count foo \nfoo 1.0] $foo
} {2.6 4}
-
test text-20.100 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
list [.t2 search -backwards -regexp -count foo bar\nfoobar\nfoo 1.0] $foo
} {1.3 14}
-
test text-20.101 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
.t2 search -backwards -regexp -count foo bar\nfoobar\nfoobanearly 1.0
} {}
-
test text-20.102 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfaoobar\nfoobar"
.t2 search -backwards -regexp -count foo bar\nfoo 1.0
} {2.4}
-
test text-20.103 {TextSearchCmd, multiline matching end of window} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfaoobar\nfoobar"
.t2 search -backwards -regexp -count foo bar\nfoobar\n\n 1.0
} {}
-
test text-20.104 {TextSearchCmd, multiline matching end of window} {
deleteWindows
pack [text .t2]
.t2 search -backwards "\n\n" 1.0
} {}
-
test text-20.105 {TextSearchCmd, multiline regexp matching} {
deleteWindows
pack [text .t2]
@@ -2013,7 +1965,6 @@ static Tcl_Obj* FSNormalizeAbsolutePath
append markExpr "\[ \n\t\r\]*\\()"
.t2 search -forwards -regexp $markExpr 1.41 end
} {}
-
test text-20.106 {TextSearchCmd, multiline regexp matching} {
# Practical example which used to crash Tk, but only after the
# search is complete. This is memory corruption caused by
@@ -2030,7 +1981,6 @@ static Tcl_Obj* FSNormalizeAbsolutePath
append markExpr "\[ \n\t\r\]*\\()"
.t2 search -forwards -regexp $markExpr 1.41 end
} {}
-
test text-20.107 {TextSearchCmd, multiline regexp matching} {
deleteWindows
pack [text .t2]
@@ -2044,77 +1994,66 @@ static Tcl_Obj* FSNormalizeAbsolutePath
append markExpr "\[ \n\t\r\]*\\()"
.t2 search -backwards -all -regexp $markExpr end
} {2.0}
-
test text-20.108 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
.t2 search -all -regexp -count foo bar\nfoo 1.0
} {1.3 2.3}
-
test text-20.109 {TextSearchCmd, multiline matching} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
.t2 search -all -backwards -regexp -count foo bar\nfoo 1.0
} {2.3 1.3}
-
test text-20.110 {TextSearchCmd, wrapping and limits} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
.t2 search -- "blah" 3.3 1.3
} {}
-
test text-20.111 {TextSearchCmd, wrapping and limits} {
deleteWindows
pack [text .t2]
.t2 insert end "foobar\nfoobar\nfoobar"
.t2 search -backwards -- "blah" 1.3 3.3
} {}
-
test text-20.112 {TextSearchCmd, wrapping and limits} {
deleteWindows
pack [text .t2]
.t2 insert end "if (stringPtr->uallocated > 0) \{x"
.t2 search -backwards -regexp -- "\[\]\")\}\[(\{\]" "1.32" 1.0
} {1.31}
-
test text-20.113 {TextSearchCmd, wrapping and limits} {
deleteWindows
pack [text .t2]
.t2 insert end "if (stringPtr->uallocated > 0) \{x"
.t2 search -regexp -- "\[\]\")\}\[(\{\]" 1.30 "1.0 lineend"
} {1.31}
-
test text-20.114 {TextSearchCmd, wrapping and limits} {
deleteWindows
pack [text .t2]
.t2 insert end "if (stringPtr->uallocated > 0) \{x"
.t2 search -backwards -all -regexp -- "\[\]\")\}\[(\{\]" "1.32" 1.0
} {1.31 1.29 1.3}
-
test text-20.115 {TextSearchCmd, wrapping and limits} {
deleteWindows
pack [text .t2]
.t2 insert end "if (stringPtr->uallocated > 0) \{x"
.t2 search -all -regexp -- "\[\]\")\}\[(\{\]" 1.0 "1.0 lineend"
} {1.3 1.29 1.31}
-
test text-20.116 {TextSearchCmd, wrapping and limits} {
deleteWindows
pack [text .t2]
.t2 insert end "if (stringPtr->uallocated > 0) \{x"
.t2 search -backwards -- "\{" "1.32" 1.0
} {1.31}
-
test text-20.117 {TextSearchCmd, wrapping and limits} {
deleteWindows
pack [text .t2]
.t2 insert end "if (stringPtr->uallocated > 0) \{x"
.t2 search -- "\{" 1.30 "1.0 lineend"
} {1.31}
-
test text-20.118 {TextSearchCmd, multiline regexp matching} {
deleteWindows
pack [text .t2]
@@ -2135,7 +2074,6 @@ Tcl_SetObjLength(objPtr, length)
append markExpr "\[ \n\t\r\]*\\()"
.t2 search -all -regexp -- $markExpr 1.0
} {4.0}
-
test text-20.119 {TextSearchCmd, multiline regexp matching} {
deleteWindows
pack [text .t2]
@@ -2144,7 +2082,6 @@ test text-20.119 {TextSearchCmd, multiline regexp matching} {
# This should not match, and should not wrap
.t2 search -regexp -- $markExpr end end
} {}
-
test text-20.120 {TextSearchCmd, multiline regexp matching} {
deleteWindows
pack [text .t2]
@@ -2153,7 +2090,6 @@ test text-20.120 {TextSearchCmd, multiline regexp matching} {
# This should not match, and should not wrap
.t2 search -regexp -- $markExpr end+10c end
} {}
-
test text-20.121 {TextSearchCmd, multiline regexp matching} {
deleteWindows
pack [text .t2]
@@ -2162,49 +2098,42 @@ test text-20.121 {TextSearchCmd, multiline regexp matching} {
# This should not match, and should not wrap
.t2 search -regexp -backwards -- $markExpr 1.0 1.0
} {}
-
test text-20.122 {TextSearchCmd, regexp linestop} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "first line\nlast line of text"
.t2 search -regexp -- {i.*x} 1.0
} {2.6}
-
test text-20.123 {TextSearchCmd, multiline regexp nolinestop matching} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "first line\nlast line of text"
.t2 search -regexp -nolinestop -- {i.*x} 1.0
} {1.1}
-
test text-20.124 {TextSearchCmd, regexp linestop} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "first line\nlast line of text"
.t2 search -regexp -all -overlap -- {i.*x} 1.0
} {2.6}
-
test text-20.124.1 {TextSearchCmd, regexp linestop} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "first line\nlast line of text"
.t2 search -regexp -all -- {i.*x} 1.0
} {2.6}
-
test text-20.125 {TextSearchCmd, multiline regexp nolinestop matching} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "first line\nlast line of text"
list [.t2 search -regexp -all -overlap -count c -nolinestop -- {i.*x} 1.0] $c
} {{1.1 2.6} {26 10}}
-
test text-20.125.1 {TextSearchCmd, multiline regexp nolinestop matching} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "first line\nlast line of text"
list [.t2 search -regexp -all -count c -nolinestop -- {i.*x} 1.0] $c
} {1.1 26}
-
test text-20.126 {TextSearchCmd, stop at end of line} {
deleteWindows
pack [text .t2]
@@ -2313,7 +2242,6 @@ See the package: marks for more information.
list [.t2 search -nolinestop -regexp -nocase -all -forwards \
-count c -- $pat 1.0 end] $c
} {{3.8 6.8 8.0 11.8} {20 26 13 14}}
-
test text-20.135 {TextSearchCmd, backwards search overlaps} {
deleteWindows
pack [text .t2]
@@ -2326,189 +2254,162 @@ test text-20.135.1 {TextSearchCmd, backwards search overlaps} {
.t2 insert 1.0 "foobarfoobaaaaaaaaaaarfoo"
.t2 search -backwards -overlap -all -regexp {fooba+rfoo} end
} {1.6 1.0}
-
test text-20.135.2 {TextSearchCmd, backwards search overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "foobarfoobaaaaaaaaaaarfoo"
.t2 search -backwards -all -regexp {fooba+rfoo} end
} {1.6}
-
test text-20.135.3 {TextSearchCmd, forwards search overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "foobarfoobaaaaaaaaaaarfoo"
.t2 search -all -overlap -regexp {fooba+rfoo} end
} {1.0 1.6}
-
test text-20.135.4 {TextSearchCmd, forwards search overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "foobarfoobaaaaaaaaaaarfoo"
.t2 search -all -regexp {fooba+rfoo} end
} {1.0}
-
test text-20.136 {TextSearchCmd, forward exact search overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "abababab"
.t2 search -exact -overlap -all {abab} 1.0
} {1.0 1.2 1.4}
-
test text-20.136.1 {TextSearchCmd, forward exact search overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "abababab"
.t2 search -exact -all {abab} 1.0
} {1.0 1.4}
-
test text-20.137 {TextSearchCmd, backward exact search overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "ababababab"
.t2 search -exact -overlap -backwards -all {abab} end
} {1.6 1.4 1.2 1.0}
-
test text-20.137.1 {TextSearchCmd, backward exact search overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "ababababab"
.t2 search -exact -backwards -all {abab} end
} {1.6 1.2}
-
test text-20.137.2 {TextSearchCmd, backward exact search overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "abababababab"
.t2 search -exact -backwards -all {abab} end
} {1.8 1.4 1.0}
-
test text-20.138 {TextSearchCmd, forward exact search overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "foo\nbar\nfoo\nbar\nfoo\nbar\nfoo\n"
.t2 search -exact -overlap -all "foo\nbar\nfoo" 1.0
} {1.0 3.0 5.0}
-
test text-20.138.1 {TextSearchCmd, forward exact search no-overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "foo\nbar\nfoo\nbar\nfoo\nbar\nfoo\n"
.t2 search -exact -all "foo\nbar\nfoo" 1.0
} {1.0 5.0}
-
test text-20.139 {TextSearchCmd, backward exact search overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "foo\nbar\nfoo\nbar\nfoo\nbar\nfoo\n"
.t2 search -exact -overlap -backward -all "foo\nbar\nfoo" end
} {5.0 3.0 1.0}
-
test text-20.140 {TextSearchCmd, backward exact search no-overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "foo\nbar\nfoo\nbar\nfoo\nbar\nfoo\n"
.t2 search -exact -backward -all "foo\nbar\nfoo" end
} {5.0 1.0}
-
test text-20.141 {TextSearchCmd, backward exact search overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "foo\nbar\nfoo\nbar\nfoo\nbar\nfoo\n"
.t2 search -regexp -backward -overlap -all "foo\nbar\nfoo" end
} {5.0 3.0 1.0}
-
test text-20.142 {TextSearchCmd, backward regexp search no-overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "foo\nbar\nfoo\nbar\nfoo\nbar\nfoo\n"
.t2 search -regexp -backward -all "foo\nbar\nfoo" end
} {5.0 1.0}
-
test text-20.142a {TextSearchCmd, backward regexp search no-overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 " aasda asdj werwer"
.t2 search -regexp -backward -- {(\$)?[\w:_]+} 1.9
} {1.7}
-
test text-20.143 {TextSearchCmd, backward regexp search no-overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 " aasda asdj werwer"
.t2 search -regexp -backward -- {(\$)?[\w:_]+} 1.9 1.5
} {1.7}
-
test text-20.144 {TextSearchCmd, backward regexp search no-overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 " aasda asdj werwer"
.t2 search -regexp -backward -- {(\$)?[\w:_]+} 1.9 1.7
} {1.7}
-
test text-20.145 {TextSearchCmd, backward regexp search no-overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 " aasda asdj werwer"
.t2 search -regexp -backward -- {(\$)?[\w:_]+} 1.9 1.8
} {1.8}
-
test text-20.146 {TextSearchCmd, backward regexp search no-overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 " aasda asdj werwer"
.t2 search -regexp -backward -all -- {(\$)?[\w:_]+} 1.9 1.3
} {1.7 1.3}
-
test text-20.147 {TextSearchCmd, backward regexp search no-overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 " aasda asdj werwer"
.t2 search -regexp -backward -all -- {(\$)?[\w:_]+} 1.9 1.13
} {}
-
test text-20.148 {TextSearchCmd, backward regexp search no-overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 " aasda asdj werwer"
.t2 search -regexp -backward -all -- {(\$)?[\w:_]+} 2.0 1.3
} {1.12 1.7 1.3}
-
test text-20.149 {TextSearchCmd, backward regexp search no-overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 " aasda asdj werwer"
.t2 search -regexp -backward -all -- {(\$)?[\w:_]+} 1.3
} {1.1 1.12 1.7 1.3}
-
test text-20.150 {TextSearchCmd, backward regexp search no-overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "abcde\nabcde\nabcde\n"
.t2 search -regexp -backward -all -- {(\w+\n)+} end
} {1.0}
-
test text-20.151 {TextSearchCmd, backward regexp search no-overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "abcde\nabcde\nabcde\n"
.t2 search -regexp -backward -all -- {(\w+\n)+} end 1.5
} {2.0}
-
test text-20.152 {TextSearchCmd, backward regexp search no-overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "abcde\nabcde\nabcde\na"
.t2 search -regexp -backward -all -- {(\w+\n\w)+} end 1.5
} {2.0}
-
test text-20.153 {TextSearchCmd, backward regexp search no-overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "abcde\nabcde\nabcde\na"
list [.t2 search -regexp -all -count foo -- {(\w+\n)+} 1.0] $foo
} {1.0 20}
-
test text-20.154 {TextSearchCmd, backward regexp search no-overlaps} {
deleteWindows
pack [text .t2]
@@ -2518,63 +2419,54 @@ test text-20.154 {TextSearchCmd, backward regexp search no-overlaps} {
[list [.t2 search -regexp -all -count foo -- {(\w+\n)+} 1.0] $foo] \
[list [.t2 search -regexp -all -count foo -- {(\w+)+} 1.0] $foo]
} {{1.0 20} {{1.0 2.0 3.0 4.0} {5 5 5 1}}}
-
test text-20.155 {TextSearchCmd, regexp search greedy} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "abcde\nabcde\nabcde\na"
list [.t2 search -regexp -all -nolinestop -count foo -- {.*} 1.0] $foo
} {1.0 20}
-
test text-20.156 {TextSearchCmd, regexp search greedy} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "abcde\nabcde\nabcde\na"
list [.t2 search -regexp -all -count foo -- {.*} 1.0] $foo
} {{1.0 2.0 3.0 4.0} {5 5 5 1}}
-
test text-20.157 {TextSearchCmd, regexp search greedy multi-line} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "abcde\nabcde\nabcde\na"
list [.t2 search -regexp -count foo -- {(\w+\n\w)+} 1.0] $foo
} {1.0 19}
-
test text-20.158 {TextSearchCmd, regexp search greedy multi-line} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "abcde\nabcde\nabcde\na"
list [.t2 search -regexp -backwards -count foo -- {(\w+\n\w)+} end] $foo
} {1.0 19}
-
test text-20.159 {TextSearchCmd, regexp search greedy multi-line} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "abcde\nabcde\nabcde\na"
list [.t2 search -regexp -all -backwards -count foo -- {(\w+\n\w)+} end] $foo
} {1.0 19}
-
test text-20.160 {TextSearchCmd, backward regexp search no-overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "abcde\nabcde\nabcde\na"
.t2 search -regexp -backward -all -- {(\w+\n\w)+} end 1.5
} {2.0}
-
test text-20.161 {TextSearchCmd, backward regexp search no-overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "abcde\nabcde\nabcde\na"
.t2 search -regexp -backward -all -- {(\w+\n\w)+} end 1.3
} {1.3}
-
test text-20.162 {TextSearchCmd, backward regexp search no-overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "abcde\nabcde\nabcde\na"
list [.t2 search -regexp -forward -count foo -- {(\w+\n\w)+} 1.3] $foo
} {1.3 16}
-
test text-20.163 {TextSearchCmd, backward regexp search no-overlaps} {
deleteWindows
pack [text .t2]
@@ -2584,21 +2476,18 @@ test text-20.163 {TextSearchCmd, backward regexp search no-overlaps} {
# but only because the search has totally wrapped around back to
# the start.
} {{1.3 1.0} {16 19}}
-
test text-20.164 {TextSearchCmd, backward regexp search no-overlaps} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "abcde\nabcde\nabcde\na"
list [.t2 search -regexp -forward -all -count foo -- {(\w+\n\w)+} 1.0 1.3] $foo
} {1.0 19}
-
test text-20.165 {TextSearchCmd, regexp search multi-line} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "aaaa\nbbbb\naaaa\nbbbb\n"
list [.t2 search -regexp -forward -all -count foo -- {(a+\n(b+\n))+} 1.0] $foo
} {1.0 20}
-
test text-20.166 {TextSearchCmd, regexp search complex cases} {
deleteWindows
pack [text .t2]
@@ -2606,7 +2495,6 @@ test text-20.166 {TextSearchCmd, regexp search complex cases} {
list [.t2 search -regexp -forward -all -count foo \
-- {(a+\n(b+\n))+} 1.0] $foo
} {1.0 20}
-
test text-20.167 {TextSearchCmd, regexp search multi-line} {
deleteWindows
pack [text .t2]
@@ -2615,7 +2503,6 @@ test text-20.167 {TextSearchCmd, regexp search multi-line} {
list [.t2 search -regexp -forward -all -count foo \
-- {(b+\nc+\nb+)\na+} 1.0] $foo
} {2.0 19}
-
test text-20.168 {TextSearchCmd, regexp search multi-line} {knownBug} {
deleteWindows
pack [text .t2]
@@ -2624,7 +2511,6 @@ test text-20.168 {TextSearchCmd, regexp search multi-line} {knownBug} {
list [.t2 search -regexp -forward -all -count foo \
-- {(a+|b+\nc+\nb+)\na+} 1.0] $foo
} {2.0 19}
-
test text-20.169 {TextSearchCmd, regexp search multi-line} {knownBug} {
deleteWindows
pack [text .t2]
@@ -2633,7 +2519,6 @@ test text-20.169 {TextSearchCmd, regexp search multi-line} {knownBug} {
list [.t2 search -regexp -forward -all -count foo \
-- {(a+|b+\nc+\nb+)+\na+} 1.0] $foo
} {2.0 19}
-
test text-20.170 {TextSearchCmd, regexp search multi-line} {
deleteWindows
pack [text .t2]
@@ -2642,7 +2527,6 @@ test text-20.170 {TextSearchCmd, regexp search multi-line} {
list [.t2 search -regexp -forward -all -count foo \
-- {((a+|b+\nc+\nb+)+\n)+a+} 1.0] $foo
} {1.0 24}
-
test text-20.171 {TextSearchCmd, regexp search multi-line} {knownBug} {
deleteWindows
pack [text .t2]
@@ -2650,7 +2534,6 @@ test text-20.171 {TextSearchCmd, regexp search multi-line} {knownBug} {
list [.t2 search -regexp -backward -all -count foo \
-- {b+\n|a+\n(b+\n)+} end] $foo
} {1.0 25}
-
test text-20.172 {TextSearchCmd, regexp search multi-line} {knownBug} {
deleteWindows
pack [text .t2]
@@ -2658,7 +2541,6 @@ test text-20.172 {TextSearchCmd, regexp search multi-line} {knownBug} {
.t2 search -regexp -backward -- {b+\n|a+\n(b+\n)+} end
# Should match at 1.0 for a true greedy match
} {1.0}
-
test text-20.172.1 {TextSearchCmd, regexp search multi-line} {
deleteWindows
pack [text .t2]
@@ -2666,7 +2548,6 @@ test text-20.172.1 {TextSearchCmd, regexp search multi-line} {
.t2 search -nolinestop -regexp -nocase -forwards -- {^(.*)\n(\1\n)+} 1.0 end
# Matches at 6.0 currently
} {2.0}
-
test text-20.173 {TextSearchCmd, regexp search multi-line} {
deleteWindows
pack [text .t2]
@@ -2676,7 +2557,6 @@ test text-20.173 {TextSearchCmd, regexp search multi-line} {
lappend res [.t2 search -count c -regexp -- {x*\ny*} 2.1] $c
set res
} {2.3 7 2.3 7}
-
test text-20.174 {TextSearchCmd, regexp search multi-line} {
deleteWindows
pack [text .t2]
@@ -2686,7 +2566,6 @@ test text-20.174 {TextSearchCmd, regexp search multi-line} {
lappend res [.t2 search -count c -regexp -- {\n+} 2.1] $c
set res
} {2.3 5 2.3 5}
-
test text-20.175 {TextSearchCmd, regexp search multi-line} {
deleteWindows
pack [text .t2]
@@ -2695,35 +2574,30 @@ test text-20.175 {TextSearchCmd, regexp search multi-line} {
lappend res [.t2 search -count c -regexp -- {(\n+(\t+ *)*)+} 2.0] $c
set res
} {2.3 13}
-
test text-20.176 {TextSearchCmd, empty search range} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "a\na\na\n"
.t2 search -- a 2.0 1.0
} {}
-
test text-20.177 {TextSearchCmd, empty search range} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "a\na\na\n"
.t2 search -backwards -- a 1.0 2.0
} {}
-
test text-20.178 {TextSearchCmd, empty search range} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "a\na\na\n"
.t2 search -- a 1.0 1.0
} {}
-
test text-20.179 {TextSearchCmd, empty search range} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "a\na\na\n"
.t2 search -backwards -- a 2.0 2.0
} {}
-
test text-20.180 {TextSearchCmd, elide up to match} {
deleteWindows
pack [text .t2]
@@ -2741,7 +2615,6 @@ test text-20.180 {TextSearchCmd, elide up to match} {
lappend res [.t2 search -elide -regexp b 1.0]
lappend res [.t2 search -elide -regexp c 1.0]
} {1.0 2.0 3.0 {} 2.0 3.0 1.0 2.0 3.0}
-
test text-20.181 {TextSearchCmd, elide up to match, backwards} {
deleteWindows
pack [text .t2]
@@ -2759,7 +2632,6 @@ test text-20.181 {TextSearchCmd, elide up to match, backwards} {
lappend res [.t2 search -backward -elide -regexp b 1.0]
lappend res [.t2 search -backward -elide -regexp c 1.0]
} {1.0 2.0 3.0 {} 2.0 3.0 1.0 2.0 3.0}
-
test text-20.182 {TextSearchCmd, elide up to match} {
deleteWindows
pack [text .t2]
@@ -2777,7 +2649,6 @@ test text-20.182 {TextSearchCmd, elide up to match} {
lappend res [.t2 search -elide b 1.0]
lappend res [.t2 search -elide c 1.0]
} {1.0 2.0 3.0 {} 2.0 3.0 1.0 2.0 3.0}
-
test text-20.183 {TextSearchCmd, elide up to match, backwards} {
deleteWindows
pack [text .t2]
@@ -2795,7 +2666,6 @@ test text-20.183 {TextSearchCmd, elide up to match, backwards} {
lappend res [.t2 search -backward -elide b 1.0]
lappend res [.t2 search -backward -elide c 1.0]
} {1.0 2.0 3.0 {} 2.0 3.0 1.0 2.0 3.0}
-
test text-20.184 {TextSearchCmd, elide up to match} {
deleteWindows
pack [text .t2]
@@ -2816,7 +2686,6 @@ test text-20.184 {TextSearchCmd, elide up to match} {
lappend res [.t2 search bc 1.0]
lappend res [.t2 search c 1.0]
} {{} {} 1.0 2.1 2.0 3.1 2.0 3.0}
-
test text-20.185 {TextSearchCmd, elide up to match} {
deleteWindows
pack [text .t2]
@@ -2837,56 +2706,48 @@ test text-20.185 {TextSearchCmd, elide up to match} {
lappend res [.t2 search -regexp bc 1.0]
lappend res [.t2 search -regexp c 1.0]
} {{} {} 1.0 2.1 2.0 3.1 2.0 3.0}
-
test text-20.186 {TextSearchCmd, strict limits} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "Hello world!\nThis is a test\n"
.t2 search -strictlimits -- "world" 1.3 1.8
} {}
-
test text-20.187 {TextSearchCmd, strict limits} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "Hello world!\nThis is a test\n"
.t2 search -strictlimits -- "world" 1.3 1.10
} {}
-
test text-20.188 {TextSearchCmd, strict limits} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "Hello world!\nThis is a test\n"
.t2 search -strictlimits -- "world" 1.3 1.11
} {1.6}
-
test text-20.189 {TextSearchCmd, strict limits backwards} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "Hello world!\nThis is a test\n"
.t2 search -strictlimits -backward -- "world" 2.3 1.8
} {}
-
test text-20.190 {TextSearchCmd, strict limits backwards} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "Hello world!\nThis is a test\n"
.t2 search -strictlimits -backward -- "world" 2.3 1.6
} {1.6}
-
test text-20.191 {TextSearchCmd, strict limits backwards} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "Hello world!\nThis is a test\n"
.t2 search -strictlimits -backward -- "world" 2.3 1.7
} {}
-
test text-20.192 {TextSearchCmd, strict limits} {
deleteWindows
pack [text .t2]
.t2 insert 1.0 "Hello world!\nThis is a test\n"
.t2 search -regexp -strictlimits -- "world" 1.3 1.8
} {}
-
test text-20.193 {TextSearchCmd, strict limits} {
deleteWindows
pack [text .t2]
@@ -2898,6 +2759,7 @@ deleteWindows
text .t2 -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 100
pack .t2
.t2 insert end "1\t2\t3\t4\t55.5"
+
test text-21.1 {TkTextGetTabs procedure} {
list [catch {.t2 configure -tabs "\{{}"} msg] $msg
} {1 {unmatched open brace in list}}
@@ -2969,12 +2831,10 @@ test text-22.9 {TextDumpCmd procedure, same indices} {
test text-22.10 {TextDumpCmd procedure, negative range} {
.t dump 1.5 1.0
} {}
-
.t delete 1.0 end
.t insert end "Line One\nLine Two\nLine Three\nLine Four"
.t mark set insert 1.0
.t mark set current 1.0
-
test text-22.11 {TextDumpCmd procedure, stop at begin-line} {
.t dump -text 1.0 2.0
} {text {Line One
@@ -2984,7 +2844,6 @@ test text-22.12 {TextDumpCmd procedure, span multiple lines} {
} {text {One
} 1.5 text {Line Two
} 2.0 text {Line Three} 3.0}
-
.t tag add x 2.0 2.end
.t tag add y 1.0 end
.t mark set m 2.4
@@ -3002,7 +2861,6 @@ test text-22.15 {TextDumpCmd procedure, tags only} {
test text-22.16 {TextDumpCmd procedure, tags only} {
.t dump -tag 1.0 end
} {tagon y 1.0 tagon x 2.0 tagoff x 2.8 tagoff y 5.0}
-
.t mark set insert 1.0
.t mark set current 1.0
test text-22.17 {TextDumpCmd procedure, marks only} {
@@ -3017,7 +2875,6 @@ test text-22.19 {TextDumpCmd procedure, marks only} {
test text-22.20 {TextDumpCmd procedure, marks only} {
.t dump -mark 1.0 end
} {mark current 1.0 mark insert 1.0 mark m 2.4 mark n 4.0 mark END 5.0}
-
button .hello -text Hello
.t window create 3.end -window .hello
for {set i 0} {$i < 100} {incr i} {
@@ -3030,7 +2887,6 @@ test text-22.21 {TextDumpCmd procedure, windows only} {
test text-22.22 {TextDumpCmd procedure, windows only} {
.t dump -window 5.0 end
} {window {} 100.0}
-
.t delete 1.0 end
eval {.t mark unset} [.t mark names]
.t insert end "Line One\nLine Two\nLine Three\nLine Four"
@@ -3099,11 +2955,9 @@ test text-24.1 {bug fix - 1642} {
test text-25.1 {TextEditCmd procedure, argument parsing} {
list [catch {.t edit} msg] $msg
} {1 {wrong # args: should be ".t edit option ?arg arg ...?"}}
-
test text-25.2 {TextEditCmd procedure, argument parsing} {
list [catch {.t edit gorp} msg] $msg
} {1 {bad edit option "gorp": must be modified, redo, reset, separator, or undo}}
-
test text-25.3 {TextEditUndo procedure, undoing changes} {
catch {destroy .t}
text .t -undo 1
@@ -3114,7 +2968,6 @@ test text-25.3 {TextEditUndo procedure, undoing changes} {
.t edit undo
.t get 1.0 end
} "line\n\n"
-
test text-25.4 {TextEditRedo procedure, redoing changes} {
catch {destroy .t}
text .t -undo 1
@@ -3126,7 +2979,6 @@ test text-25.4 {TextEditRedo procedure, redoing changes} {
.t edit redo
.t get 1.0 end
} "line\nshould be back after redo\n\n"
-
test text-25.5 {TextEditUndo procedure, resetting stack} {
catch {destroy .t}
text .t -undo 1
@@ -3138,7 +2990,6 @@ test text-25.5 {TextEditUndo procedure, resetting stack} {
catch {.t edit undo} msg
set msg
} "nothing to undo"
-
test text-25.6 {TextEditCmd procedure, insert separator} {
catch {destroy .t}
text .t -undo 1
@@ -3149,7 +3000,6 @@ test text-25.6 {TextEditCmd procedure, insert separator} {
.t edit undo
.t get 1.0 end
} "line 1\n\n"
-
test text-25.7 {-autoseparators configuration option} {
catch {destroy .t}
text .t -undo 1 -autoseparators 0
@@ -3160,7 +3010,6 @@ test text-25.7 {-autoseparators configuration option} {
.t edit undo
.t get 1.0 end
} "\n"
-
test text-25.8 {TextEditCmd procedure, modified flag} {
catch {destroy .t}
text .t
@@ -3168,7 +3017,6 @@ test text-25.8 {TextEditCmd procedure, modified flag} {
.t insert end "line 1\n"
.t edit modified
} {1}
-
test text-25.9 {TextEditCmd procedure, reset modified flag} {
catch {destroy .t}
text .t
@@ -3177,7 +3025,6 @@ test text-25.9 {TextEditCmd procedure, reset modified flag} {
.t edit modified 0
.t edit modified
} {0}
-
test text-25.10 {TextEditCmd procedure, set modified flag} {
catch {destroy .t}
text .t
@@ -3185,7 +3032,6 @@ test text-25.10 {TextEditCmd procedure, set modified flag} {
.t edit modified 1
.t edit modified
} {1}
-
test text-25.11 {<<Modified>> virtual event} {
set ::retval unmodified
catch {destroy .t}
@@ -3196,7 +3042,6 @@ test text-25.11 {<<Modified>> virtual event} {
.t insert end "nothing special\n"
set ::retval
} {modified}
-
test text-25.12 {<<Selection>> virtual event} {
set ::retval no_selection
catch {destroy .t}
@@ -3208,7 +3053,6 @@ test text-25.12 {<<Selection>> virtual event} {
.t tag add sel 1.0 1.1
set ::retval
} {selection_changed}
-
test text-25.13 {-maxundo configuration option} {
catch {destroy .t}
text .t -undo 1 -autoseparators 1 -maxundo 2
@@ -3221,6 +3065,13 @@ test text-25.13 {-maxundo configuration option} {
catch {.t edit undo}
.t get 1.0 end
} "line 1\n\n"
+test text-25.15 {bug fix 1536735 - undo with empty text} {
+ catch {destroy .t}
+ text .t -undo 1
+ .t delete 1.0
+ .t edit undo
+ .t edit modified
+} {0}
test text-26.1 {bug fix - 624372, ControlUtfProc long lines} {
destroy .t
@@ -3233,13 +3084,11 @@ test text-27.1 {tabs - must be positive and must be increasing} {
pack [text .t -wrap none]
list [catch {.t configure -tabs {0}} msg] $msg
} {1 {tab stop "0" is not at a positive distance}}
-
test text-27.2 {tabs - must be positive and must be increasing} {
destroy .t
pack [text .t -wrap none]
list [catch {.t configure -tabs {-5}} msg] $msg
} {1 {tab stop "-5" is not at a positive distance}}
-
test text-27.3 {tabs - must be positive and must be increasing} {knownBug} {
# This bug will be fixed in Tk 9.0, when we can allow a minor
# incompatibility with Tk 8.x
@@ -3247,7 +3096,6 @@ test text-27.3 {tabs - must be positive and must be increasing} {knownBug} {
pack [text .t -wrap none]
list [catch {.t configure -tabs {10c 5c}} msg] $msg
} {1 {tabs must be monotonically increasing, but "5c" is smaller than or equal to the previous tab}}
-
test text-27.4 {tabs - must be positive and must be increasing} {
destroy .t
pack [text .t -wrap none]
@@ -3283,7 +3131,6 @@ test text-29.0 {peer widgets} {
pack [.t peer create .tt.t]
destroy .t .tt
} {}
-
test text-29.1 {peer widgets} {
destroy .t .t1 .t2
toplevel .t1
@@ -3300,7 +3147,6 @@ test text-29.1 {peer widgets} {
destroy .t .t2
update
} {}
-
test text-29.2 {peer widgets} {
destroy .t .t1 .t2
toplevel .t1
@@ -3317,7 +3163,6 @@ test text-29.2 {peer widgets} {
destroy .t .t2
update
} {}
-
test text-29.3 {peer widgets} {
destroy .t .tt
toplevel .tt
@@ -3329,7 +3174,6 @@ test text-29.3 {peer widgets} {
update
destroy .t .tt
} {}
-
test text-29.4 {peer widgets} {
destroy .t .tt
toplevel .tt
@@ -3344,7 +3188,6 @@ test text-29.4 {peer widgets} {
destroy .t .tt
set res
} {7.0 7.0}
-
test text-29.4.1 {peer widgets} {
destroy .t .tt
toplevel .tt
@@ -3359,7 +3202,6 @@ test text-29.4.1 {peer widgets} {
destroy .t .tt
set res
} {7.0 21.0}
-
test text-29.5 {peer widgets} {
destroy .t .tt
toplevel .tt
@@ -3379,7 +3221,6 @@ test text-29.5 {peer widgets} {
destroy .t .tt
set res
} {ok}
-
test text-29.6 {peer widgets} {
destroy .t .tt
toplevel .tt
@@ -3394,7 +3235,6 @@ test text-29.6 {peer widgets} {
destroy .t .tt
set res
} {6.0}
-
test text-29.7 {peer widgets} {
destroy .t .tt
toplevel .tt
@@ -3409,7 +3249,6 @@ test text-29.7 {peer widgets} {
destroy .t .tt
set res
} {4.0}
-
test text-29.8 {peer widgets} {
destroy .t .tt
toplevel .tt
@@ -3424,7 +3263,6 @@ test text-29.8 {peer widgets} {
destroy .t .tt
set res
} {1.0}
-
test text-29.9 {peer widgets} {
destroy .t
pack [text .t]
@@ -3439,7 +3277,6 @@ test text-29.9 {peer widgets} {
destroy .t
set res
} {{1.0 100.0} {1.0 11.0}}
-
test text-29.10 {peer widgets} {
destroy .t
pack [text .t]
@@ -3454,7 +3291,6 @@ test text-29.10 {peer widgets} {
destroy .t
set res
} {{1.0 100.0} {1.0 90.0}}
-
test text-29.11 {peer widgets} {
destroy .t
pack [text .t]
@@ -3469,7 +3305,6 @@ test text-29.11 {peer widgets} {
destroy .t
set res
} {{1.0 100.0} {1.0 90.0}}
-
test text-29.12 {peer widgets} {
destroy .t
pack [text .t]
@@ -3490,7 +3325,6 @@ test text-29.12 {peer widgets} {
destroy .t
set res
} {{} {1.0 2.0 4.0 6.0} next {4.0 6.0} {} {} {} prev {} {1.0 2.0} {1.0 2.0} {1.0 2.0}}
-
test text-29.13 {peer widgets} {
destroy .t
pack [text .t]
@@ -3510,7 +3344,6 @@ test text-29.13 {peer widgets} {
destroy .t
set res
} {{4.0 6.0} next {4.0 6.0} {} {} {} prev {} {} {} {}}
-
test text-29.14 {peer widgets} {
destroy .t
pack [text .t]
@@ -3530,7 +3363,6 @@ test text-29.14 {peer widgets} {
destroy .t
set res
} {{1.0 2.0 4.0 6.0} next {4.0 6.0} {} {} {} prev {} {1.0 2.0} {1.0 2.0} {1.0 2.0}}
-
test text-29.15 {peer widgets} {
destroy .t
pack [text .t]
@@ -3549,7 +3381,6 @@ test text-29.15 {peer widgets} {
destroy .t
set res
} {{1.0 11.0} 1 {1.0 11.0} {1.0 6.0} {1.0 11.0}}
-
test text-29.16 {peer widgets} {
destroy .t
pack [text .t]
@@ -3563,7 +3394,6 @@ test text-29.16 {peer widgets} {
destroy .t
set res
} {1.0 11.0}
-
test text-29.17 {peer widgets} {
destroy .t
pack [text .t]
@@ -3660,7 +3490,6 @@ test text-31.9 {peer widget -start, -end} {
.t configure -start {} -end {}
set res
} {0 {}}
-
test text-31.10 {peer widget -start, -end} {
.t delete 1.0 end
for {set i 1} {$i < 100} {incr i} {
@@ -3675,7 +3504,6 @@ test text-31.10 {peer widget -start, -end} {
lappend res [.t index end]
set res
} {101.0 1 101.0 1 101.0 101.0}
-
test text-31.11 {peer widget -start, -end} {
.t delete 1.0 end
for {set i 1} {$i < 100} {incr i} {
@@ -3718,7 +3546,6 @@ test text-33.1 {widget dump -command alters tags} {
.t delete 1.0 end
.t insert end "abc\n" a "---" {} "def" b " \n" {} "ghi\n" c
.t tag configure b -background red
-
proc Dumpy {key value index} {
#puts "KK: $key, $value"
.t tag add $value [list $index linestart] [list $index lineend]
@@ -3726,12 +3553,10 @@ test text-33.1 {widget dump -command alters tags} {
.t dump -all -command Dumpy 1.0 end
set result "ok"
} {ok}
-
test text-33.2 {widget dump -command makes massive changes} {
.t delete 1.0 end
.t insert end "abc\n" a "---" {} "def" b " \n" {} "ghi\n" c
.t tag configure b -background red
-
proc Dumpy {key value index} {
#puts "KK: $key, $value"
.t delete 1.0 end
@@ -3739,12 +3564,10 @@ test text-33.2 {widget dump -command makes massive changes} {
.t dump -all -command Dumpy 1.0 end
set result "ok"
} {ok}
-
test text-33.3 {widget dump -command destroys widget} {
.t delete 1.0 end
.t insert end "abc\n" a "---" {} "def" b " \n" {} "ghi\n" c
.t tag configure b -background red
-
proc Dumpy {key value index} {
#puts "KK: $key, $value"
destroy .t