diff options
author | fvogel <fvogelnew1@free.fr> | 2022-03-02 07:01:15 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2022-03-02 07:01:15 (GMT) |
commit | d684ccf62f782e4cfe05e658485e3011f5f6b27e (patch) | |
tree | cb8613e357ec81a3a6c95f42e0e2c59d67fbd7fe /tests/textBTree.test | |
parent | 9da8f6aeed710b9e1bb3042f3d0a926bc9ddd65a (diff) | |
download | tk-d684ccf62f782e4cfe05e658485e3011f5f6b27e.zip tk-d684ccf62f782e4cfe05e658485e3011f5f6b27e.tar.gz tk-d684ccf62f782e4cfe05e658485e3011f5f6b27e.tar.bz2 |
Add new tests b-tree-2.22 -2.23 -2.24 -2.25 -2.26 copied from the revised_text branch, in order to improve tests coverage with the legacy text widget and to avoid unnecessary differences in the text widget test suite.
Diffstat (limited to 'tests/textBTree.test')
-rw-r--r-- | tests/textBTree.test | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/tests/textBTree.test b/tests/textBTree.test index fd97afa..b1f232c 100644 --- a/tests/textBTree.test +++ b/tests/textBTree.test @@ -257,6 +257,68 @@ test btree-2.21 {deleting with negative range} -body { .t delete 3.2 3.2 .t get 1.0 1000000.0 } -result "Line 1\nLine 2\nLine 3\n" +test btree-2.22 {deleting into beginning of elided range} -setup { + .t delete 1.0 end +} -body { + for {set n 1} {$n <= 10} {incr n} { + .t insert end "Line $n\n" + } + .t tag configure Elided -elide 1 + .t tag add Elided 6.0 end + .t delete 5.0 "5.0 + 8 chars" + .t get 4.0 7.0 +} -cleanup { + .t tag delete Elided + .t delete 1.0 end +} -result "Line 4\nine 6\nLine 7\n" +test btree-2.23 {deleting from within elided range} -body { + for {set n 1} {$n <= 10} {incr n} { + .t insert end "Line $n\n" + } + .t tag configure Elided -elide 1 + .t tag add Elided 6.0 8.0 + .t delete 7.0 9.0 + .t get 6.0 8.0 +} -cleanup { + .t tag delete Elided + .t delete 1.0 end +} -result "Line 6\nLine 9\n" +test btree-2.24 {deleting whole elided range} -body { + for {set n 1} {$n <= 10} {incr n} { + .t insert end "Line $n\n" + } + .t tag configure Elided -elide 1 + .t tag add Elided 6.0 8.0 + .t delete 5.0 9.0 + .t get 4.0 6.0 +} -cleanup { + .t tag delete Elided + .t delete 1.0 end +} -result "Line 4\nLine 9\n" +test btree-2.25 {deleting several elided ranges} -body { + for {set n 1} {$n <= 10} {incr n} { + .t insert end "Line $n\n" + } + .t tag configure Elided -elide 1 + .t tag add Elided 6.0 6.2 6.4 6.5 7.2 7.6 + .t delete 5.0 9.0 + .t get 4.0 7.0 +} -cleanup { + .t tag delete Elided + .t delete 1.0 end +} -result "Line 4\nLine 9\nLine 10\n" +test btree-2.26 {deleting first char of elided range} -body { + for {set n 1} {$n <= 10} {incr n} { + .t insert end "Line $n\n" + } + .t tag configure Elided -elide 1 + .t tag add Elided 6.0 end + .t delete 6.0 6.1 + .t get 5.0 7.0 +} -cleanup { + .t tag delete Elided + .t delete 1.0 end +} -result "Line 5\nine 6\n" test btree-3.1 {inserting with tags} -body { |