diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-02-21 08:52:54 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-02-21 08:52:54 (GMT) |
commit | 5c1a56d36b45b4032778ee7f972181673a3a5ff0 (patch) | |
tree | 668427e000ea020a58f9714c6988f14b3edfadb4 | |
parent | 73cc9cd62f844146e1d9a835511da3b641aafac0 (diff) | |
parent | 1fb8e115c4cd0dc9a351e7a6e183f8956996117d (diff) | |
download | tcl-5c1a56d36b45b4032778ee7f972181673a3a5ff0.zip tcl-5c1a56d36b45b4032778ee7f972181673a3a5ff0.tar.gz tcl-5c1a56d36b45b4032778ee7f972181673a3a5ff0.tar.bz2 |
Merge 8.6
-rw-r--r-- | generic/tclMain.c | 2 | ||||
-rw-r--r-- | library/init.tcl | 4 | ||||
-rw-r--r-- | tests/init.test | 13 |
3 files changed, 16 insertions, 3 deletions
diff --git a/generic/tclMain.c b/generic/tclMain.c index 0ed5de1..7f13ebf 100644 --- a/generic/tclMain.c +++ b/generic/tclMain.c @@ -118,7 +118,7 @@ static void Prompt(Tcl_Interp *interp, InteractiveState *isPtr); static void StdinProc(ClientData clientData, int mask); static void FreeMainInterp(ClientData clientData); -#if !defined(_WIN32) || defined(UNICODE) +#if !defined(_WIN32) || defined(UNICODE) && !defined(TCL_ASCII_MAIN) static Tcl_ThreadDataKey dataKey; /* diff --git a/library/init.tcl b/library/init.tcl index c6ef7a2..4ea22d8 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -60,13 +60,13 @@ namespace eval tcl { if {$Dir ni $::auto_path} { lappend ::auto_path $Dir } - catch { + if {[info exists ::tcl_pkgPath]} { catch { foreach Dir $::tcl_pkgPath { if {$Dir ni $::auto_path} { lappend ::auto_path $Dir } } - } + }} if {![interp issafe]} { variable Path [encoding dirs] diff --git a/tests/init.test b/tests/init.test index 2a81b52..a241c0b 100644 --- a/tests/init.test +++ b/tests/init.test @@ -18,6 +18,19 @@ if {"::tcltest" ni [namespace children]} { # Clear out any namespaces called test_ns_* catch {namespace delete {*}[namespace children :: test_ns_*]} +test init-0.1 {no error on initialization phase (init.tcl)} -setup { + interp create slave +} -body { + slave eval { + list [set v [info exists ::errorInfo]] \ + [if {$v} {set ::errorInfo}] \ + [set v [info exists ::errorCode]] \ + [if {$v} {set ::errorCode}] + } +} -cleanup { + interp delete slave +} -result {0 {} 0 {}} + # Six cases - white box testing test init-1.1 {auto_qualify - absolute cmd - namespace} { |