diff options
author | vincentdarley <vincentdarley> | 2003-11-08 17:22:45 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley> | 2003-11-08 17:22:45 (GMT) |
commit | f1ed0750bc8ef3f269f20750e44a0d58e9677082 (patch) | |
tree | d3be8a33f1d8bfc5c803dad0b85a7b30184743b9 /tests | |
parent | 70578fe7b3c2b20b549a09800b88fcba2a1e0cd8 (diff) | |
download | tk-f1ed0750bc8ef3f269f20750e44a0d58e9677082.zip tk-f1ed0750bc8ef3f269f20750e44a0d58e9677082.tar.gz tk-f1ed0750bc8ef3f269f20750e44a0d58e9677082.tar.bz2 |
elide tag handling, once more
Diffstat (limited to 'tests')
-rw-r--r-- | tests/text.test | 26 | ||||
-rw-r--r-- | tests/textDisp.test | 16 |
2 files changed, 40 insertions, 2 deletions
diff --git a/tests/text.test b/tests/text.test index 6e32ffd..9e85c8b 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.24 2003/11/07 15:36:27 vincentdarley Exp $ +# RCS: @(#) $Id: text.test,v 1.25 2003/11/08 17:22:46 vincentdarley Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -706,6 +706,30 @@ test text-0.2.50 {counting with tag priority eliding} { lappend res [.t count -displaychars 1.2 1.5] lappend res [.t count -displaychars 1.3 1.5] } {0 0 0 0 3 2 1 1} +test text-0.2.51 {counting with tag priority eliding} { + set res {} + .t delete 1.0 end + .t tag configure WELCOME -elide 1 + .t tag configure SYSTEM -elide 0 + .t tag configure TRAFFIC -elide 1 + .t insert end "\n" {SYSTEM TRAFFIC} + .t insert end "\n" WELCOME + lappend res [.t count -displaychars 1.0 end] + lappend res [.t count -displaychars 1.0 end-1c] + lappend res [.t count -displaychars 1.0 1.2] + lappend res [.t count -displaychars 2.0 end] + lappend res [.t count -displaychars 2.0 end-1c] + 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 -1 indices"] + lappend res [.t index "end -1 display indices"] + lappend res [.t index "end -1 display chars"] + lappend res [.t index "end -2 indices"] + lappend res [.t index "end -2 display indices"] + lappend res [.t index "end -2 display chars"] +} {1 0 0 1 0 2.0 4.0 4.0 4.0 3.0 3.0 3.0 2.0 1.0 1.0} .t delete 1.0 end .t insert end $current diff --git a/tests/textDisp.test b/tests/textDisp.test index abf1d2a..61ba27a 100644 --- a/tests/textDisp.test +++ b/tests/textDisp.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: textDisp.test,v 1.15 2003/11/07 12:06:47 vincentdarley Exp $ +# RCS: @(#) $Id: textDisp.test,v 1.16 2003/11/08 17:22:46 vincentdarley Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -186,6 +186,20 @@ test textDisp-0.4 {double tag elide transition} { destroy .txt } {} +test textDisp-0.5 {double tag elide transition} { + catch {destroy .txt} + pack [text .txt] + .txt tag configure WELCOME -elide 1 + .txt tag configure SYSTEM -elide 0 + .txt tag configure TRAFFIC -elide 1 + + .txt insert end "\n" {SYSTEM TRAFFIC} + .txt insert end "\n" WELCOME + # Crash was here. + update + destroy .txt +} {} + test textDisp-1.1 {GetStyle procedure, priorities and tab stops} { .t delete 1.0 end .t insert 1.0 "x\ty" |