summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-20 08:06:20 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-20 08:06:20 (GMT)
commit12f94f7a7ad80891a9c993ce4da737b4ba938acf (patch)
treea04b95b31e68a55fcd7a47f9b4fde32babcf4879 /tests
parent4b795b56c88522adffddbfc839aae6beacdb809e (diff)
downloadtcl-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')
-rw-r--r--tests/event.test2
-rw-r--r--tests/string.test18
-rw-r--r--tests/timer.test4
3 files changed, 21 insertions, 3 deletions
diff --git a/tests/event.test b/tests/event.test
index 4996b97..9c5e569 100644
--- a/tests/event.test
+++ b/tests/event.test
@@ -504,7 +504,7 @@ test event-11.4 {Tcl_VwaitCmd procedure} {} {
after 10; update; # On Mac make sure update won't take long
after 100 {set x x-done}
after 200 {set y y-done}
- after 300 {set z z-done}
+ after 400 {set z z-done}
after idle {set q q-done}
set x before
set y before
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
diff --git a/tests/timer.test b/tests/timer.test
index db508e5..53044b5 100644
--- a/tests/timer.test
+++ b/tests/timer.test
@@ -191,11 +191,11 @@ test timer-6.4 {Tcl_AfterCmd procedure, ms argument} {
} {before after}
test timer-6.5 {Tcl_AfterCmd procedure, ms argument} {
set x before
- after 300 set x after
+ after 400 set x after
after 200
update
set y $x
- after 200
+ after 400
update
list $y $x
} {before after}