summaryrefslogtreecommitdiffstats
path: root/tests/string.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-20 20:04:01 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-20 20:04:01 (GMT)
commitc00086981f23ffe4b513b35885644a4400e4713d (patch)
tree6e075f4385f5f11a9552932ebdedc2e75a790d46 /tests/string.test
parent878077e3b00ba3eb84f253417fa2f7973d15ed81 (diff)
parent12f94f7a7ad80891a9c993ce4da737b4ba938acf (diff)
downloadtcl-c00086981f23ffe4b513b35885644a4400e4713d.zip
tcl-c00086981f23ffe4b513b35885644a4400e4713d.tar.gz
tcl-c00086981f23ffe4b513b35885644a4400e4713d.tar.bz2
New test-cases (backported from 8.7) adapted for pre-TIP-502 behavior
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