From 12f94f7a7ad80891a9c993ce4da737b4ba938acf Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 20 Dec 2018 08:06:20 +0000 Subject: (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. --- tests/event.test | 2 +- tests/string.test | 18 ++++++++++++++++++ tests/timer.test | 4 ++-- 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} -- cgit v0.12