summaryrefslogtreecommitdiffstats
path: root/tests/string.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/string.test')
-rw-r--r--tests/string.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/string.test b/tests/string.test
index 9bceb37..fc98629 100644
--- a/tests/string.test
+++ b/tests/string.test
@@ -421,6 +421,24 @@ test string-4.16.$noComp {string first, normal string vs pure unicode string} {
run {list [representationpoke $s] [representationpoke $m] \
[string first $m $s]}
} {{string 1} {string 0} 2}
+test string-4.17.$noComp {string first, corner case} {
+ run {string first a aaa 4294967295}
+} {-1}
+test string-4.18.$noComp {string first, corner case} {
+ run {string first a aaa -1}
+} {0}
+test string-4.19.$noComp {string first, corner case} {
+ run {string first a aaa end-5}
+} {0}
+test string-4.20.$noComp {string last, corner case} {
+ run {string last a aaa 4294967295}
+} {2}
+test string-4.21.$noComp {string last, corner case} {
+ run {string last a aaa -1}
+} {-1}
+test string-4.22.$noComp {string last, corner case} {
+ run {string last a aaa end-5}
+} {-1}
test string-5.1.$noComp {string index} {
list [catch {run {string index}} msg] $msg