diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-03-29 07:30:11 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-03-29 07:30:11 (GMT) |
commit | 3c3e58351a1441181863aa015487e10307e5d6de (patch) | |
tree | 3081e6ad1f8efc367bce61bcd8ee5caa9a3c65fd /tests/cluster.test | |
parent | 2937446e0ba89de3f5f4cd81d6758999b3722193 (diff) | |
parent | 287ae817d18f64049ec3b37a0d233fec9117ed94 (diff) | |
download | tk-3c3e58351a1441181863aa015487e10307e5d6de.zip tk-3c3e58351a1441181863aa015487e10307e5d6de.tar.gz tk-3c3e58351a1441181863aa015487e10307e5d6de.tar.bz2 |
Merge "enhanced-index" branch, so this TIP can make use of indices like "end-1"
Diffstat (limited to 'tests/cluster.test')
-rw-r--r-- | tests/cluster.test | 60 |
1 files changed, 45 insertions, 15 deletions
diff --git a/tests/cluster.test b/tests/cluster.test index f3f3ea1..59b94d0 100644 --- a/tests/cluster.test +++ b/tests/cluster.test @@ -16,7 +16,7 @@ testConstraint needsTcl87orICU [expr {[package vsatisfies [package provide Tcl] test cluster-1.0 {::tk::startOfCluster} -body { ::tk::startOfCluster 🤡 -1 -} -result -1 +} -result {} test cluster-1.1 {::tk::startOfCluster} -body { ::tk::startOfCluster 🤡 0 } -result 0 @@ -29,9 +29,15 @@ test cluster-1.3 {::tk::startOfCluster} -constraints needsTcl87orICU -body { test cluster-1.4 {::tk::startOfCluster} -constraints needsTcl87orICU -body { ::tk::startOfCluster 🤡 3 } -result 2 -test cluster-1.5 {::tk::startOfCluster} -body { +test cluster-1.5 {::tk::startOfCluster} -constraints needsTcl87orICU -body { ::tk::startOfCluster 🤡 end } -result 0 +test cluster-1.6 {::tk::startOfCluster} -body { + ::tk::startOfCluster 🤡 {} +} -result {} +test cluster-1.7 {::tk::startOfCluster} -constraints needsTcl87orICU -body { + ::tk::startOfCluster 🤡 end-1 +} -result 0 test cluster-2.0 {::tk::endOfCluster} -body { ::tk::endOfCluster 🤡 -1 @@ -44,13 +50,19 @@ test cluster-2.2 {::tk::endOfCluster} -constraints needsTcl87orICU -body { } -result 2 test cluster-2.3 {::tk::endOfCluster} -body { ::tk::endOfCluster 🤡 2 -} -result -1 +} -result {} test cluster-2.4 {::tk::endOfCluster} -body { ::tk::endOfCluster 🤡 3 -} -result -1 +} -result {} test cluster-2.5 {::tk::endOfCluster} -constraints needsTcl87orICU -body { ::tk::endOfCluster 🤡 end } -result 2 +test cluster-2.6 {::tk::endOfCluster} -body { + ::tk::endOfCluster 🤡 {} +} -result 0 +test cluster-2.7 {::tk::endOfCluster} -constraints needsTcl87orICU -body { + ::tk::endOfCluster 🤡 end-1 +} -result 2 test cluster-3.0 {::tk::endOfWord} -body { ::tk::endOfWord "ab cd" -1 @@ -63,26 +75,32 @@ test cluster-3.2 {::tk::endOfWord} -body { } -result 2 test cluster-3.3 {::tk::endOfWord} -body { ::tk::endOfWord "ab cd" 2 -} -result -1 +} -result {} test cluster-3.4 {::tk::endOfWord} -body { ::tk::endOfWord "ab cd" 3 -} -result -1 +} -result {} test cluster-3.5 {::tk::endOfWord} -body { ::tk::endOfWord "ab cd" 4 -} -result -1 +} -result {} test cluster-3.6 {::tk::endOfWord} -body { ::tk::endOfWord "ab cd" 5 -} -result -1 +} -result {} test cluster-3.7 {::tk::endOfWord} -body { ::tk::endOfWord "ab cd" end -} -result -1 +} -result {} +test cluster-3.8 {::tk::endOfWord} -body { + ::tk::endOfWord "ab cd" {} +} -result 2 +test cluster-3.9 {::tk::endOfWord} -body { + ::tk::endOfWord "ab cd" end-1 +} -result {} test cluster-4.0 {::tk::startOfPreviousWord} -body { ::tk::startOfPreviousWord "ab cd" -1 -} -result -1 +} -result {} test cluster-4.1 {::tk::startOfPreviousWord} -body { ::tk::startOfPreviousWord "ab cd" 0 -} -result -1 +} -result {} test cluster-4.2 {::tk::startOfPreviousWord} -body { ::tk::startOfPreviousWord "ab cd" 1 } -result 0 @@ -101,6 +119,12 @@ test cluster-4.6 {::tk::startOfPreviousWord} -body { test cluster-4.7 {::tk::startOfPreviousWord} -body { ::tk::startOfPreviousWord "ab cd" end } -result 3 +test cluster-4.8 {::tk::startOfPreviousWord} -body { + ::tk::startOfPreviousWord "ab cd" {} +} -result {} +test cluster-4.9 {::tk::startOfPreviousWord} -body { + ::tk::startOfPreviousWord "ab cd" end-1 +} -result 0 test cluster-5.0 {::tk::startOfNextWord} -body { ::tk::startOfNextWord "ab cd" -1 @@ -116,16 +140,22 @@ test cluster-5.3 {::tk::startOfNextWord} -body { } -result 3 test cluster-5.4 {::tk::startOfNextWord} -body { ::tk::startOfNextWord "ab cd" 3 -} -result -1 +} -result {} test cluster-5.5 {::tk::startOfNextWord} -body { ::tk::startOfNextWord "ab cd" 4 -} -result -1 +} -result {} test cluster-5.6 {::tk::startOfNextWord} -body { ::tk::startOfNextWord "ab cd" 5 -} -result -1 +} -result {} test cluster-5.7 {::tk::startOfNextWord} -body { ::tk::startOfNextWord "ab cd" end -} -result -1 +} -result {} +test cluster-5.8 {::tk::startOfNextWord} -body { + ::tk::startOfNextWord "ab cd" {} +} -result 3 +test cluster-5.9 {::tk::startOfNextWord} -body { + ::tk::startOfNextWord "ab cd" end-1 +} -result {} test cluster-6.0 {::tk::startOfCluster} -body { ::tk::startOfCluster a b c d |