diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-20 08:06:20 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-20 08:06:20 (GMT) |
commit | 12f94f7a7ad80891a9c993ce4da737b4ba938acf (patch) | |
tree | a04b95b31e68a55fcd7a47f9b4fde32babcf4879 /tests/string.test | |
parent | 4b795b56c88522adffddbfc839aae6beacdb809e (diff) | |
download | tcl-12f94f7a7ad80891a9c993ce4da737b4ba938acf.zip tcl-12f94f7a7ad80891a9c993ce4da737b4ba938acf.tar.gz tcl-12f94f7a7ad80891a9c993ce4da737b4ba938acf.tar.bz2 |
(cherry-pick) relax the timings of 2 tests, which incidentally fail on Travis CI.
Also backport a few new test-cases, adapted to match pre-TIP-502 behavior.
Diffstat (limited to 'tests/string.test')
-rw-r--r-- | tests/string.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/string.test b/tests/string.test index f3bb366..9a5e0c0 100644 --- a/tests/string.test +++ b/tests/string.test @@ -218,6 +218,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 |