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 From e0e776a57eb9fa578df0dc7f523f0823f14a1952 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 20 Dec 2018 20:02:00 +0000 Subject: Remove unused MODULE_SCOPE functions --- generic/tclInt.h | 5 ----- generic/tclZipfs.c | 1 - 2 files changed, 6 deletions(-) diff --git a/generic/tclInt.h b/generic/tclInt.h index 3a9b2ee..1782215 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -3271,10 +3271,6 @@ MODULE_SCOPE Tcl_WideInt TclpGetWideClicks(void); MODULE_SCOPE double TclpWideClicksToNanoseconds(Tcl_WideInt clicks); #endif MODULE_SCOPE int TclZlibInit(Tcl_Interp *interp); -MODULE_SCOPE int TclZipfsInit(Tcl_Interp *interp); -MODULE_SCOPE int TclZipfsMount(Tcl_Interp *interp, const char *zipname, - const char *mntpt, const char *passwd); -MODULE_SCOPE int TclZipfsUnmount(Tcl_Interp *interp, const char *zipname); MODULE_SCOPE void * TclpThreadCreateKey(void); MODULE_SCOPE void TclpThreadDeleteKey(void *keyPtr); MODULE_SCOPE void TclpThreadSetMasterTSD(void *tsdKeyPtr, void *ptr); @@ -3283,7 +3279,6 @@ MODULE_SCOPE void TclErrorStackResetIf(Tcl_Interp *interp, const char *msg, int length); /* Tip 430 */ MODULE_SCOPE int TclZipfs_Init(Tcl_Interp *interp); -MODULE_SCOPE int TclZipfs_SafeInit(Tcl_Interp *interp); /* diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index 6acb5db..78eec7e 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -4754,7 +4754,6 @@ TclZipfs_Init( */ WriteLock(); - /* Tcl_StaticPackage(interp, "zipfs", TclZipfs_Init, TclZipfs_Init); */ if (!ZipFS.initialized) { ZipfsSetup(); } -- cgit v0.12