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 8fc5b0e..a3590e5 100644
--- a/tests/string.test
+++ b/tests/string.test
@@ -225,6 +225,24 @@ test string-4.15 {string first, ability to two-byte encoded utf-8 chars} {
set uchar \u057e ;# character with two-byte encoding in utf-8
string first % %#$uchar$uchar#$uchar$uchar#% 3
} 8
+test string-4.17 {string first, corner case} {
+ string first a aaa 4294967295
+} {0}
+test string-4.18 {string first, corner case} {
+ string first a aaa -1
+} {0}
+test string-4.19 {string first, corner case} {
+ string first a aaa end-5
+} {0}
+test string-4.20 {string last, corner case} {
+ string last a aaa 4294967295
+} {-1}
+test string-4.21 {string last, corner case} {
+ string last a aaa -1
+} {-1}
+test string-4.22 {string last, corner case} {
+ string last a aaa end-5
+} {-1}
test string-5.1 {string index} {
list [catch {string index} msg] $msg