summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkjnash <k.j.nash@usa.net>2020-07-25 12:24:26 (GMT)
committerkjnash <k.j.nash@usa.net>2020-07-25 12:24:26 (GMT)
commit0d094ff62aa60c15d6afecdc694e910646c813cf (patch)
tree789d473ef1b3d991bddc7f954d814630825ac196
parentf2815760c5d26291fa3af7efe04b78a40743415e (diff)
downloadtcl-0d094ff62aa60c15d6afecdc694e910646c813cf.zip
tcl-0d094ff62aa60c15d6afecdc694e910646c813cf.tar.gz
tcl-0d094ff62aa60c15d6afecdc694e910646c813cf.tar.bz2
Rename command safe::setAutoPathSync to safe::setSyncMode.
-rw-r--r--doc/safe.n6
-rw-r--r--library/safe.tcl12
-rw-r--r--library/tclIndex2
-rw-r--r--tests/safe-stock87.test88
-rw-r--r--tests/safe-zipfs.test134
-rw-r--r--tests/safe.test370
6 files changed, 306 insertions, 306 deletions
diff --git a/doc/safe.n b/doc/safe.n
index 5777f74..7bae0be 100644
--- a/doc/safe.n
+++ b/doc/safe.n
@@ -23,7 +23,7 @@ safe \- Creating and manipulating safe interpreters
.sp
\fB::safe::interpFindInAccessPath\fR \fIslave\fR \fIdirectory\fR
.sp
-\fB::safe::setAutoPathSync\fR ?\fInewValue\fR?
+\fB::safe::setSyncMode\fR ?\fInewValue\fR?
.sp
\fB::safe::setLogCmd\fR ?\fIcmd arg...\fR?
.SS OPTIONS
@@ -151,7 +151,7 @@ $slave eval [list set tk_library \e
.CE
.RE
.TP
-\fB::safe::setAutoPathSync\fR ?\fInewValue\fR?
+\fB::safe::setSyncMode\fR ?\fInewValue\fR?
This command is used to get or set the "Sync Mode" of the Safe Base.
When an argument is supplied, the command returns an error if the argument
is not a boolean value, or if any Safe Base interpreters exist. Typically
@@ -392,7 +392,7 @@ of the ::auto_path and access path ("Sync Mode" on) is still the default.
However, the Safe Base offers the option of limiting the safe interpreter's
::auto_path to the much shorter list of directories that is necessary for
it to perform its function ("Sync Mode" off). Use the command
-\fB::safe::setAutoPathSync\fR to choose the mode before creating any Safe
+\fB::safe::setSyncMode\fR to choose the mode before creating any Safe
Base interpreters.
.PP
In either mode, the most convenient way to initialize a safe interpreter is
diff --git a/library/safe.tcl b/library/safe.tcl
index d7b0966..f17d854 100644
--- a/library/safe.tcl
+++ b/library/safe.tcl
@@ -349,7 +349,7 @@ proc ::safe::InterpCreate {
#
# It is the caller's responsibility, if it supplies a non-empty value for
# access_path, to make the first directory in the path suitable for use as
-# tcl_library, and (if ![setAutoPathSync]), to set the slave's ::auto_path.
+# tcl_library, and (if ![setSyncMode]), to set the slave's ::auto_path.
proc ::safe::InterpSetConfig {slave access_path staticsok nestedok deletehook autoPath withAutoPath} {
global auto_path
@@ -422,9 +422,9 @@ proc ::safe::InterpSetConfig {slave access_path staticsok nestedok deletehook au
# Set the slave auto_path to a tokenized raw_auto_path.
# Silently ignore any directories that are not in the access path.
- # If [setAutoPathSync], SyncAccessPath will overwrite this value with the
+ # If [setSyncMode], SyncAccessPath will overwrite this value with the
# full access path.
- # If ![setAutoPathSync], Safe Base code will not change this value.
+ # If ![setSyncMode], Safe Base code will not change this value.
set tokens_auto_path {}
foreach dir $raw_auto_path {
if {[dict exists $remap_access_path $dir]} {
@@ -1355,7 +1355,7 @@ proc ::safe::Setup {} {
}
# Accessor method for ::safe::AutoPathSync
-# Usage: ::safe::setAutoPathSync ?newValue?
+# Usage: ::safe::setSyncMode ?newValue?
# Respond to changes by calling Setup again, preserving any
# caller-defined logging. This allows complete equivalence with
# prior Safe Base behavior if AutoPathSync is true.
@@ -1368,7 +1368,7 @@ proc ::safe::Setup {} {
# (The initialization of AutoPathSync at the end of this file is acceptable
# because Setup has not yet been called.)
-proc ::safe::setAutoPathSync {args} {
+proc ::safe::setSyncMode {args} {
variable AutoPathSync
if {[llength $args] == 0} {
@@ -1391,7 +1391,7 @@ proc ::safe::setAutoPathSync {args} {
setLogCmd $TmpLog
}
} else {
- set msg {wrong # args: should be "safe::setAutoPathSync ?newValue?"}
+ set msg {wrong # args: should be "safe::setSyncMode ?newValue?"}
return -code error $msg
}
diff --git a/library/tclIndex b/library/tclIndex
index 731bdbb..a8db3cb 100644
--- a/library/tclIndex
+++ b/library/tclIndex
@@ -61,7 +61,7 @@ set auto_index(::safe::DirInAccessPath) [list ::tcl::Pkg::source [file join $dir
set auto_index(::safe::Subset) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
set auto_index(::safe::AliasSubset) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
set auto_index(::safe::AliasEncoding) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
-set auto_index(::safe::setAutoPathSync) [list source [file join $dir safe.tcl]]
+set auto_index(::safe::setSyncMode) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
set auto_index(tcl_wordBreakAfter) [list ::tcl::Pkg::source [file join $dir word.tcl]]
set auto_index(tcl_wordBreakBefore) [list ::tcl::Pkg::source [file join $dir word.tcl]]
set auto_index(tcl_endOfWord) [list ::tcl::Pkg::source [file join $dir word.tcl]]
diff --git a/tests/safe-stock87.test b/tests/safe-stock87.test
index 1a29018..c36792c 100644
--- a/tests/safe-stock87.test
+++ b/tests/safe-stock87.test
@@ -111,10 +111,10 @@ testConstraint AutoSyncDefined 1
# high level general test
test safe-stock87-7.1 {tests that everything works at high level with conventional AutoPathSync, use pkg opt} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
set i [safe::interpCreate]
} -body {
@@ -128,14 +128,14 @@ test safe-stock87-7.1 {tests that everything works at high level with convention
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result 0.4.*
test safe-stock87-7.2 {tests specific path and interpFind/AddToAccessPath with conventional AutoPathSync, use pkg opt} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
} else {
set SyncVal_TMP 1
}
@@ -154,15 +154,15 @@ test safe-stock87-7.2 {tests specific path and interpFind/AddToAccessPath with c
$mappA -- [safe::interpDelete $i]
} -cleanup {
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result "{\$p(:0:)} {\$p(:*:)} -- 1 {$pkgOptErrMsg} --\
{TCLLIB */dummy/unixlike/test/path} -- {}"
test safe-stock87-7.4 {tests specific path and positive search with conventional AutoPathSync, use pkg opt} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
} else {
set SyncVal_TMP 1
}
@@ -182,15 +182,15 @@ test safe-stock87-7.4 {tests specific path and positive search with conventional
# other than the first and last in the access path.
} -cleanup {
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:0:)} {$p(:*:)} -- 0 0.4.* --\
{TCLLIB * TCLLIB/OPTDIR} -- {}}
test safe-stock87-7.5 {tests positive and negative module loading with conventional AutoPathSync} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
set i [safe::interpCreate]
interp eval $i {
@@ -207,7 +207,7 @@ test safe-stock87-7.5 {tests positive and negative module loading with conventio
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -result {1 {can't find package shell} 0}
@@ -222,10 +222,10 @@ test safe-stock87-9.8 {test auto-loading in safe interpreters, was safe-5.1} -se
safe::interpDelete a
} -result -1
test safe-stock87-9.11 {interpConfigure change the access path; pkgIndex.tcl packages unaffected by token rearrangement with conventional AutoPathSync, uses pkg opt and tcl::idna} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
} -body {
set i [safe::interpCreate -accessPath [list $tcl_library \
@@ -262,17 +262,17 @@ test safe-stock87-9.11 {interpConfigure change the access path; pkgIndex.tcl pac
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:1:)} {$p(:2:)} -- {$p(:2:)} {$p(:1:)} -- 0 1.* 0 0.4.* --\
{TCLLIB TCLLIB/OPTDIR TCLLIB/JARDIR*} --\
{TCLLIB TCLLIB/JARDIR TCLLIB/OPTDIR*} --\
0 0 0 example.com}
test safe-stock87-9.13 {interpConfigure change the access path; pkgIndex.tcl packages fail if directory de-listed with conventional AutoPathSync, uses pkg opt and tcl::idna} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
} -body {
set i [safe::interpCreate -accessPath [list $tcl_library \
@@ -305,19 +305,19 @@ test safe-stock87-9.13 {interpConfigure change the access path; pkgIndex.tcl pac
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:1:)} {$p(:2:)} -- 1 {* not found in access path} --\
1 {* not found in access path} -- 1 1 --\
{TCLLIB TCLLIB/OPTDIR TCLLIB/JARDIR*} -- {TCLLIB*}}
test safe-stock87-18.1 {cf. safe-stock87-7.1opt - tests that everything works at high level without conventional AutoPathSync, use pkg opt} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
# Without AutoPathSync, we need a more complete auto_path,
# because the slave will use the same value.
@@ -339,16 +339,16 @@ test safe-stock87-18.1 {cf. safe-stock87-7.1opt - tests that everything works at
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result 0.4.*
test safe-stock87-18.2 {cf. safe-stock87-7.2opt - tests specific path and interpFind/AddToAccessPath without conventional AutoPathSync, use pkg opt} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
} -body {
set i [safe::interpCreate -nostat -nested 1 -accessPath [list [info library]]]
@@ -366,18 +366,18 @@ test safe-stock87-18.2 {cf. safe-stock87-7.2opt - tests specific path and interp
[safe::interpDelete $i]
} -cleanup {
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result "{} {\$p(:0:)} {\$p(:*:)} 1 {$pkgOptErrMsg}\
{-accessPath {[list $tcl_library */dummy/unixlike/test/path]}\
-statics 0 -nested 1 -deleteHook {} -autoPath [list $tcl_library]} {}"
test safe-stock87-18.4 {cf. safe-stock87-7.4opt - tests specific path and positive search and auto_path without conventional AutoPathSync, use pkg opt} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
} -body {
set i [safe::interpCreate -nostat -nested 1 -accessPath [list [info library]]]
@@ -403,18 +403,18 @@ test safe-stock87-18.4 {cf. safe-stock87-7.4opt - tests specific path and positi
[safe::interpDelete $i]
} -cleanup {
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result "{} {{\$p(:0:)}} {\$p(:0:)} {\$p(:*:)} 0 0.4.*\
{-accessPath {[list $tcl_library *$tcl_library/$pkgOptDir]}\
-statics 0 -nested 1 -deleteHook {} -autoPath [list $tcl_library]} {}"
test safe-stock87-18.5 {cf. safe-stock87-7.5 - tests positive and negative module loading without conventional AutoPathSync} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
set i [safe::interpCreate]
interp eval $i {
@@ -431,7 +431,7 @@ test safe-stock87-18.5 {cf. safe-stock87-7.5 - tests positive and negative modul
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -result {1 {can't find package shell} 0}
diff --git a/tests/safe-zipfs.test b/tests/safe-zipfs.test
index 4ec01d1..7594e3a 100644
--- a/tests/safe-zipfs.test
+++ b/tests/safe-zipfs.test
@@ -174,10 +174,10 @@ test safe-zipfs-5.6 {example modules packages, test in master interpreter, appen
# high level general test
# Use zipped example packages not http1.0 etc
test safe-zipfs-7.1 {tests that everything works at high level with conventional AutoPathSync; zipfs} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
set tmpAutoPath $::auto_path
lappend ::auto_path [file join $ZipMountPoint auto0]
@@ -194,14 +194,14 @@ test safe-zipfs-7.1 {tests that everything works at high level with conventional
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result 1.2.3
test safe-zipfs-7.2 {tests specific path and interpFind/AddToAccessPath with conventional AutoPathSync; zipfs} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
} else {
set SyncVal_TMP 1
}
@@ -222,16 +222,16 @@ test safe-zipfs-7.2 {tests specific path and interpFind/AddToAccessPath with con
$mappA -- [safe::interpDelete $i]
} -cleanup {
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:0:)} {$p(:*:)} {$p(:*:)} --\
1 {can't find package SafeTestPackage1} --\
{TCLLIB */dummy/unixlike/test/path ZIPDIR/auto0} -- {}}
test safe-zipfs-7.4 {tests specific path and positive search with conventional AutoPathSync; zipfs} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
} else {
set SyncVal_TMP 1
}
@@ -251,16 +251,16 @@ test safe-zipfs-7.4 {tests specific path and positive search with conventional A
# other than the first and last in the access path.
} -cleanup {
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:0:)} {$p(:*:)} -- 0 1.2.3 --\
{TCLLIB * ZIPDIR/auto0/auto1} -- {}}
test safe-zipfs-9.9 {interpConfigure change the access path; tclIndex commands unaffected by token rearrangement (dummy test of doreset) with conventional AutoPathSync; zipfs} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
} -body {
set i [safe::interpCreate -accessPath [list $tcl_library \
@@ -298,16 +298,16 @@ test safe-zipfs-9.9 {interpConfigure change the access path; tclIndex commands u
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:1:)} {$p(:2:)} -- {$p(:2:)} {$p(:1:)} -- 0 ok1 0 ok2 --\
{TCLLIB ZIPDIR/auto0/auto1 ZIPDIR/auto0/auto2*} --\
{TCLLIB ZIPDIR/auto0/auto2 ZIPDIR/auto0/auto1*}}
test safe-zipfs-9.10 {interpConfigure change the access path; tclIndex commands unaffected by token rearrangement (actual test of doreset) with conventional AutoPathSync; zipfs} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
} -body {
set i [safe::interpCreate -accessPath [list $tcl_library \
@@ -343,17 +343,17 @@ test safe-zipfs-9.10 {interpConfigure change the access path; tclIndex commands
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:1:)} {$p(:2:)} -- {$p(:2:)} {$p(:1:)} --\
0 ok1 0 ok2 --\
{TCLLIB ZIPDIR/auto0/auto1 ZIPDIR/auto0/auto2*} --\
{TCLLIB ZIPDIR/auto0/auto2 ZIPDIR/auto0/auto1*}}
test safe-zipfs-9.11 {interpConfigure change the access path; pkgIndex.tcl packages unaffected by token rearrangement with conventional AutoPathSync; zipfs} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
} -body {
# For complete correspondence to safe-stock87-9.11, include auto0 in access path.
@@ -395,17 +395,17 @@ test safe-zipfs-9.11 {interpConfigure change the access path; pkgIndex.tcl packa
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:2:)} {$p(:3:)} -- {$p(:3:)} {$p(:2:)} -- 0 1.2.3 0 2.3.4 --\
{TCLLIB ZIPDIR/auto0 ZIPDIR/auto0/auto1 ZIPDIR/auto0/auto2*} --\
{TCLLIB ZIPDIR/auto0 ZIPDIR/auto0/auto2 ZIPDIR/auto0/auto1*} --\
0 OK1 0 OK2}
test safe-zipfs-9.12 {interpConfigure change the access path; pkgIndex.tcl packages unaffected by token rearrangement, 9.10 without path auto0 with conventional AutoPathSync; zipfs} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
} -body {
set i [safe::interpCreate -accessPath [list $tcl_library \
@@ -441,7 +441,7 @@ test safe-zipfs-9.12 {interpConfigure change the access path; pkgIndex.tcl packa
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:1:)} {$p(:2:)} -- {$p(:2:)} {$p(:1:)} --\
0 1.2.3 0 2.3.4 --\
@@ -449,10 +449,10 @@ test safe-zipfs-9.12 {interpConfigure change the access path; pkgIndex.tcl packa
{TCLLIB ZIPDIR/auto0/auto2 ZIPDIR/auto0/auto1*} --\
0 OK1 0 OK2}
test safe-zipfs-9.13 {interpConfigure change the access path; pkgIndex.tcl packages fail if directory de-listed, with conventional AutoPathSync; zipfs} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
} -body {
set i [safe::interpCreate -accessPath [list $tcl_library \
@@ -485,16 +485,16 @@ test safe-zipfs-9.13 {interpConfigure change the access path; pkgIndex.tcl packa
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:1:)} {$p(:2:)} -- 1 {* not found in access path} --\
1 {* not found in access path} -- 1 1 --\
{TCLLIB ZIPDIR/auto0/auto1 ZIPDIR/auto0/auto2*} -- {TCLLIB*}}
test safe-zipfs-9.20 {check module loading, with conventional AutoPathSync; zipfs} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
set oldTm [tcl::tm::path list]
foreach path $oldTm {
@@ -529,7 +529,7 @@ test safe-zipfs-9.20 {check module loading, with conventional AutoPathSync; zipf
}
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{{$p(:1:)} {$p(:2:)} {$p(:3:)}} -- {{$p(:1:)}} --\
0 0.5 0 1.0 0 2.0 --\
@@ -545,10 +545,10 @@ test safe-zipfs-9.20 {check module loading, with conventional AutoPathSync; zipf
# comparing with expected results. The test is therefore not totally strict,
# but will notice missing or surplus directories.
test safe-zipfs-9.21 {interpConfigure change the access path; check module loading, with conventional AutoPathSync; stale data case 1; zipfs} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
set oldTm [tcl::tm::path list]
foreach path $oldTm {
@@ -603,7 +603,7 @@ test safe-zipfs-9.21 {interpConfigure change the access path; check module loadi
}
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{{$p(:1:)} {$p(:2:)} {$p(:3:)}} -- {{$p(:1:)}} --\
{{$p(:3:)} {$p(:4:)} {$p(:5:)}} -- {{$p(:3:)}} --\
@@ -615,10 +615,10 @@ test safe-zipfs-9.21 {interpConfigure change the access path; check module loadi
res0 res1 res2}
# See comments on lsort after test safe-zipfs-9.20.
test safe-zipfs-9.22 {interpConfigure change the access path; check module loading, with conventional AutoPathSync; stale data case 0; zipfs} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
set oldTm [tcl::tm::path list]
foreach path $oldTm {
@@ -668,7 +668,7 @@ test safe-zipfs-9.22 {interpConfigure change the access path; check module loadi
}
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{{$p(:1:)} {$p(:2:)} {$p(:3:)}} -- {{$p(:1:)}} --\
{{$p(:3:)} {$p(:4:)} {$p(:5:)}} -- {{$p(:3:)}} --\
@@ -680,10 +680,10 @@ test safe-zipfs-9.22 {interpConfigure change the access path; check module loadi
res0 res1 res2}
# See comments on lsort after test safe-zipfs-9.20.
test safe-zipfs-9.23 {interpConfigure change the access path; check module loading, with conventional AutoPathSync; stale data case 3; zipfs} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
set oldTm [tcl::tm::path list]
foreach path $oldTm {
@@ -743,7 +743,7 @@ test safe-zipfs-9.23 {interpConfigure change the access path; check module loadi
}
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{{$p(:1:)} {$p(:2:)} {$p(:3:)}} -- {{$p(:1:)}} --\
{{$p(:3:)} {$p(:4:)} {$p(:5:)}} -- {{$p(:3:)}} --\
@@ -755,10 +755,10 @@ test safe-zipfs-9.23 {interpConfigure change the access path; check module loadi
res0 res1 res2}
# See comments on lsort after test safe-zipfs-9.20.
test safe-zipfs-9.24 {interpConfigure change the access path; check module loading, with conventional AutoPathSync; stale data case 2 (worst case); zipfs} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
set oldTm [tcl::tm::path list]
foreach path $oldTm {
@@ -813,7 +813,7 @@ test safe-zipfs-9.24 {interpConfigure change the access path; check module loadi
}
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{{$p(:1:)} {$p(:2:)} {$p(:3:)}} -- {{$p(:1:)}} --\
{{$p(:3:)} {$p(:4:)} {$p(:5:)}} -- {{$p(:3:)}} --\
@@ -826,12 +826,12 @@ test safe-zipfs-9.24 {interpConfigure change the access path; check module loadi
# See comments on lsort after test safe-zipfs-9.20.
test safe-zipfs-18.1 {cf. safe-zipfs-7.1 - tests that everything works at high level without conventional AutoPathSync; zipfs} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
# Without AutoPathSync, we need a more complete auto_path,
# because the slave will use the same value.
@@ -853,16 +853,16 @@ test safe-zipfs-18.1 {cf. safe-zipfs-7.1 - tests that everything works at high l
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result 1.2.3
test safe-zipfs-18.2 {cf. safe-zipfs-7.2 - tests specific path and interpFind/AddToAccessPath without conventional AutoPathSync; zipfs} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
} -body {
set i [safe::interpCreate -nostat -nested 1 -accessPath [list [info library]]]
@@ -882,7 +882,7 @@ test safe-zipfs-18.2 {cf. safe-zipfs-7.2 - tests specific path and interpFind/Ad
[safe::interpDelete $i]
} -cleanup {
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result "{} {\$p(:0:)} {\$p(:*:)} {\$p(:*:)}\
1 {can't find package SafeTestPackage1}\
@@ -891,12 +891,12 @@ test safe-zipfs-18.2 {cf. safe-zipfs-7.2 - tests specific path and interpFind/Ad
$ZipMountPoint/auto0]}\
-statics 0 -nested 1 -deleteHook {} -autoPath [list $tcl_library]} {}"
test safe-zipfs-18.4 {cf. safe-zipfs-7.4 - tests specific path and positive search and auto_path without conventional AutoPathSync; zipfs} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
} -body {
set i [safe::interpCreate -nostat -nested 1 -accessPath [list [info library]]]
@@ -927,7 +927,7 @@ test safe-zipfs-18.4 {cf. safe-zipfs-7.4 - tests specific path and positive sear
[safe::interpDelete $i]
} -cleanup {
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result "{} {{\$p(:0:)}} {\$p(:0:)} {\$p(:*:)} {\$p(:*:)} 0 1.2.3\
{-accessPath {[list $tcl_library *$ZipMountPoint/auto0 $ZipMountPoint/auto0/auto1]}\
diff --git a/tests/safe.test b/tests/safe.test
index 8959523..16fa94f 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -68,10 +68,10 @@ test safe-1.1 {safe::interpConfigure syntax} -returnCodes error -body {
} -result {no value given for parameter "slave" (use -help for full usage) :
slave name () name of the slave}
test safe-1.2 {safe::interpCreate syntax, Sync Mode on} -returnCodes error -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
} else {
set SyncVal_TMP 1
}
@@ -79,7 +79,7 @@ test safe-1.2 {safe::interpCreate syntax, Sync Mode on} -returnCodes error -setu
safe::interpCreate -help
} -cleanup {
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -result {Usage information:
Var/FlagName Type Value Help
@@ -93,18 +93,18 @@ test safe-1.2 {safe::interpCreate syntax, Sync Mode on} -returnCodes error -setu
-nested boolean (false) nested loading
-deleteHook script () delete hook}
test safe-1.2.1 {safe::interpCreate syntax, Sync Mode off} -returnCodes error -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
} -body {
safe::interpCreate -help
} -cleanup {
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -result {Usage information:
Var/FlagName Type Value Help
@@ -368,10 +368,10 @@ rename SafeEval {}
### Corresponding tests with Sync Mode off are 17.*
test safe-7.1 {positive non-module package require, Sync Mode on} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
set tmpAutoPath $::auto_path
lappend ::auto_path [file join $TestsDir auto0]
@@ -388,14 +388,14 @@ test safe-7.1 {positive non-module package require, Sync Mode on} -setup {
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result 1.2.3
test safe-7.2 {negative non-module package require with specific path and interpAddToAccessPath, Sync Mode on} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
} else {
set SyncVal_TMP 1
}
@@ -415,7 +415,7 @@ test safe-7.2 {negative non-module package require with specific path and interp
$mappA -- [safe::interpDelete $i]
} -cleanup {
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:0:)} {$p(:*:)} {$p(:*:)} --\
1 {can't find package SafeTestPackage1} --\
@@ -452,10 +452,10 @@ test safe-7.3.1 {check that safe subinterpreters work with namespace names} -set
[interp exists $j] [info vars ::safe::S*]
} -match glob -result {{} {} ok ok {} 0 {}}
test safe-7.4 {positive non-module package require with specific path and interpAddToAccessPath, Sync Mode on} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
} else {
set SyncVal_TMP 1
}
@@ -475,15 +475,15 @@ test safe-7.4 {positive non-module package require with specific path and interp
# other than the first and last in the access path.
} -cleanup {
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:0:)} {$p(:*:)} -- 0 1.2.3 --\
{TCLLIB * TESTSDIR/auto0/auto1} -- {}}
test safe-7.5 {positive and negative module package require, including ancestor directory issue, Sync Mode on} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
tcl::tm::path add [file join $TestsDir auto0 modules]
set i [safe::interpCreate]
@@ -501,7 +501,7 @@ test safe-7.5 {positive and negative module package require, including ancestor
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -result {1 {can't find package test1} 0}
@@ -757,10 +757,10 @@ test safe-9.7 {interpConfigure widget like behaviour (demystified)} -body {
{-accessPath * -statics 1 -nested 1 -deleteHook {foo bar}}\
{-accessPath * -statics 0 -nested 0 -deleteHook toto}}
test safe-9.8 {autoloading commands indexed in tclIndex files, Sync Mode on} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
} -body {
set i [safe::interpCreate -accessPath [list $tcl_library \
@@ -780,15 +780,15 @@ test safe-9.8 {autoloading commands indexed in tclIndex files, Sync Mode on} -se
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:1:)} {$p(:2:)} -- 0 ok1 0 ok2 --\
{TCLLIB TESTSDIR/auto0/auto1 TESTSDIR/auto0/auto2*}}
test safe-9.9 {interpConfigure change the access path; tclIndex commands unaffected by token rearrangement (dummy test of doreset), Sync Mode on} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
} -body {
set i [safe::interpCreate -accessPath [list $tcl_library \
@@ -826,16 +826,16 @@ test safe-9.9 {interpConfigure change the access path; tclIndex commands unaffec
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:1:)} {$p(:2:)} -- {$p(:2:)} {$p(:1:)} -- 0 ok1 0 ok2 --\
{TCLLIB TESTSDIR/auto0/auto1 TESTSDIR/auto0/auto2*} --\
{TCLLIB TESTSDIR/auto0/auto2 TESTSDIR/auto0/auto1*}}
test safe-9.10 {interpConfigure change the access path; tclIndex commands unaffected by token rearrangement (actual test of doreset), Sync Mode on} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
} -body {
set i [safe::interpCreate -accessPath [list $tcl_library \
@@ -871,17 +871,17 @@ test safe-9.10 {interpConfigure change the access path; tclIndex commands unaffe
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:1:)} {$p(:2:)} -- {$p(:2:)} {$p(:1:)} --\
0 ok1 0 ok2 --\
{TCLLIB TESTSDIR/auto0/auto1 TESTSDIR/auto0/auto2*} --\
{TCLLIB TESTSDIR/auto0/auto2 TESTSDIR/auto0/auto1*}}
test safe-9.11 {interpConfigure change the access path; pkgIndex.tcl packages unaffected by token rearrangement, Sync Mode on} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
} -body {
# For complete correspondence to safe-9.10opt, include auto0 in access path.
@@ -923,17 +923,17 @@ test safe-9.11 {interpConfigure change the access path; pkgIndex.tcl packages un
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:2:)} {$p(:3:)} -- {$p(:3:)} {$p(:2:)} -- 0 1.2.3 0 2.3.4 --\
{TCLLIB TESTSDIR/auto0 TESTSDIR/auto0/auto1 TESTSDIR/auto0/auto2*} --\
{TCLLIB TESTSDIR/auto0 TESTSDIR/auto0/auto2 TESTSDIR/auto0/auto1*} --\
0 OK1 0 OK2}
test safe-9.12 {interpConfigure change the access path; pkgIndex.tcl packages unaffected by token rearrangement, safe-9.11 without path auto0, Sync Mode on} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
} -body {
set i [safe::interpCreate -accessPath [list $tcl_library \
@@ -970,7 +970,7 @@ test safe-9.12 {interpConfigure change the access path; pkgIndex.tcl packages un
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:1:)} {$p(:2:)} -- {$p(:2:)} {$p(:1:)} --\
0 1.2.3 0 2.3.4 --\
@@ -978,10 +978,10 @@ test safe-9.12 {interpConfigure change the access path; pkgIndex.tcl packages un
{TCLLIB TESTSDIR/auto0/auto2 TESTSDIR/auto0/auto1*} --\
0 OK1 0 OK2}
test safe-9.13 {interpConfigure change the access path; pkgIndex.tcl packages fail if directory de-listed, Sync Mode on} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
} -body {
set i [safe::interpCreate -accessPath [list $tcl_library \
@@ -1014,16 +1014,16 @@ test safe-9.13 {interpConfigure change the access path; pkgIndex.tcl packages fa
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:1:)} {$p(:2:)} -- 1 {* not found in access path} --\
1 {* not found in access path} -- 1 1 --\
{TCLLIB TESTSDIR/auto0/auto1 TESTSDIR/auto0/auto2*} -- {TCLLIB*}}
test safe-9.20 {check module loading, Sync Mode on} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
set oldTm [tcl::tm::path list]
foreach path $oldTm {
@@ -1058,7 +1058,7 @@ test safe-9.20 {check module loading, Sync Mode on} -setup {
}
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{{$p(:1:)} {$p(:2:)} {$p(:3:)}} -- {{$p(:1:)}} --\
0 0.5 0 1.0 0 2.0 --\
@@ -1074,10 +1074,10 @@ test safe-9.20 {check module loading, Sync Mode on} -setup {
# comparing with expected results. The test is therefore not totally strict,
# but will notice missing or surplus directories.
test safe-9.21 {interpConfigure change the access path; check module loading, Sync Mode on; stale data case 1} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
set oldTm [tcl::tm::path list]
foreach path $oldTm {
@@ -1132,7 +1132,7 @@ test safe-9.21 {interpConfigure change the access path; check module loading, Sy
}
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{{$p(:1:)} {$p(:2:)} {$p(:3:)}} -- {{$p(:1:)}} --\
{{$p(:3:)} {$p(:4:)} {$p(:5:)}} -- {{$p(:3:)}} --\
@@ -1144,10 +1144,10 @@ test safe-9.21 {interpConfigure change the access path; check module loading, Sy
res0 res1 res2}
# See comments on lsort after test safe-9.20.
test safe-9.22 {interpConfigure change the access path; check module loading, Sync Mode on; stale data case 0} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
set oldTm [tcl::tm::path list]
foreach path $oldTm {
@@ -1197,7 +1197,7 @@ test safe-9.22 {interpConfigure change the access path; check module loading, Sy
}
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{{$p(:1:)} {$p(:2:)} {$p(:3:)}} -- {{$p(:1:)}} --\
{{$p(:3:)} {$p(:4:)} {$p(:5:)}} -- {{$p(:3:)}} --\
@@ -1209,10 +1209,10 @@ test safe-9.22 {interpConfigure change the access path; check module loading, Sy
res0 res1 res2}
# See comments on lsort after test safe-9.20.
test safe-9.23 {interpConfigure change the access path; check module loading, Sync Mode on; stale data case 3} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
set oldTm [tcl::tm::path list]
foreach path $oldTm {
@@ -1272,7 +1272,7 @@ test safe-9.23 {interpConfigure change the access path; check module loading, Sy
}
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{{$p(:1:)} {$p(:2:)} {$p(:3:)}} -- {{$p(:1:)}} --\
{{$p(:3:)} {$p(:4:)} {$p(:5:)}} -- {{$p(:3:)}} --\
@@ -1284,10 +1284,10 @@ test safe-9.23 {interpConfigure change the access path; check module loading, Sy
res0 res1 res2}
# See comments on lsort after test safe-9.20.
test safe-9.24 {interpConfigure change the access path; check module loading, Sync Mode on; stale data case 2 (worst case)} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
set oldTm [tcl::tm::path list]
foreach path $oldTm {
@@ -1342,7 +1342,7 @@ test safe-9.24 {interpConfigure change the access path; check module loading, Sy
}
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{{$p(:1:)} {$p(:2:)} {$p(:3:)}} -- {{$p(:1:)}} --\
{{$p(:3:)} {$p(:4:)} {$p(:5:)}} -- {{$p(:3:)}} --\
@@ -1727,10 +1727,10 @@ test safe-14.1 {Check that module path is the same as in the master interpreter
safe::interpDelete $i
} -result [::tcl::tm::path list]
test safe-14.2 {Check that first element of slave auto_path (and access path) is Tcl Library, Sync Mode on} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
set lib1 [info library]
@@ -1749,16 +1749,16 @@ test safe-14.2 {Check that first element of slave auto_path (and access path) is
set ::auto_path $::auto_TMP
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -result [list [info library] [info library]]
test safe-14.2.1 {Check that first element of slave auto_path (and access path) is Tcl Library, Sync Mode off} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
set lib1 [info library]
@@ -1777,14 +1777,14 @@ test safe-14.2.1 {Check that first element of slave auto_path (and access path)
set ::auto_path $::auto_TMP
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -result [list [info library] [info library]]
test safe-14.3 {Check that first element of slave auto_path (and access path) is Tcl Library, even if not true for master, Sync Mode on} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
set lib1 [info library]
@@ -1805,16 +1805,16 @@ test safe-14.3 {Check that first element of slave auto_path (and access path) is
set ::auto_path $::auto_TMP
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -result [list [info library] [info library]]
test safe-14.3.1 {Check that first element of slave auto_path (and access path) is Tcl Library, even if not true for master, Sync Mode off} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
set lib1 [info library]
@@ -1835,7 +1835,7 @@ test safe-14.3.1 {Check that first element of slave auto_path (and access path)
set ::auto_path $::auto_TMP
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -result [list [info library] [info library]]
@@ -1981,12 +1981,12 @@ test safe-16.8 {Bug 3529949: defang ~user in paths used by AliasGlob (2)} -setup
### Corresponding tests with Sync Mode on are 7.*
test safe-17.1 {cf. safe-7.1 - positive non-module package require, Sync Mode off} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
# Without AutoPathSync, we need a more complete auto_path,
# because the slave will use the same value.
@@ -2008,16 +2008,16 @@ test safe-17.1 {cf. safe-7.1 - positive non-module package require, Sync Mode of
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result 1.2.3
test safe-17.2 {cf. safe-7.2 - negative non-module package require with specific path and interpAddToAccessPath, Sync Mode off} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
} -body {
set i [safe::interpCreate -nostat -nested 1 -accessPath [list [info library]]]
@@ -2036,7 +2036,7 @@ test safe-17.2 {cf. safe-7.2 - negative non-module package require with specific
[safe::interpDelete $i]
} -cleanup {
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result "{} {\$p(:0:)} {\$p(:*:)} {\$p(:*:)}\
1 {can't find package SafeTestPackage1}\
@@ -2046,12 +2046,12 @@ test safe-17.2 {cf. safe-7.2 - negative non-module package require with specific
-statics 0 -nested 1 -deleteHook {} -autoPath [list $tcl_library]} {}"
# (not a counterpart of safe-7.3)
test safe-17.3 {Check that default auto_path is the same as in the master interpreter, Sync Mode off} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
set i [safe::interpCreate]
} -body {
@@ -2065,16 +2065,16 @@ test safe-17.3 {Check that default auto_path is the same as in the master interp
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -result $::auto_path
test safe-17.4 {cf. safe-7.4 - positive non-module package require with specific path and interpAddToAccessPath, Sync Mode off} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
} -body {
set i [safe::interpCreate -nostat -nested 1 -accessPath [list [info library]]]
@@ -2105,19 +2105,19 @@ test safe-17.4 {cf. safe-7.4 - positive non-module package require with specific
[safe::interpDelete $i]
} -cleanup {
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result "{} {{\$p(:0:)}} {\$p(:0:)} {\$p(:*:)} {\$p(:*:)} 0 1.2.3\
{-accessPath {[list $tcl_library *$TestsDir/auto0 $TestsDir/auto0/auto1]}\
-statics 0 -nested 1 -deleteHook {}\
-autoPath {[list $tcl_library $TestsDir/auto0]}} {}"
test safe-17.5 {cf. safe-7.5 - positive and negative module package require, including ancestor directory issue, Sync Mode off} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
tcl::tm::path add [file join $TestsDir auto0 modules]
set i [safe::interpCreate]
@@ -2135,17 +2135,17 @@ test safe-17.5 {cf. safe-7.5 - positive and negative module package require, inc
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -result {1 {can't find package test1} 0}
### 18. Test tokenization of directories available to a slave.
test safe-18.1 {Check that each directory of the default auto_path is a valid token, Sync Mode on} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
set i [safe::interpCreate]
} -body {
@@ -2162,16 +2162,16 @@ test safe-18.1 {Check that each directory of the default auto_path is a valid to
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -result {}
test safe-18.1.1 {Check that each directory of the default auto_path is a valid token, Sync Mode off} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
set i [safe::interpCreate]
} -body {
@@ -2188,14 +2188,14 @@ test safe-18.1.1 {Check that each directory of the default auto_path is a valid
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -result {}
test safe-18.2 {Check that each directory of the module path is a valid token, Sync Mode on} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 1
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 1
}
set i [safe::interpCreate]
} -body {
@@ -2212,16 +2212,16 @@ test safe-18.2 {Check that each directory of the module path is a valid token, S
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -result {}
test safe-18.2.1 {Check that each directory of the module path is a valid token, Sync Mode off} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
set i [safe::interpCreate]
} -body {
@@ -2238,7 +2238,7 @@ test safe-18.2.1 {Check that each directory of the module path is a valid token,
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -result {}
@@ -2247,12 +2247,12 @@ test safe-18.2.1 {Check that each directory of the module path is a valid token,
### If Sync Mode is on, a corresponding test with Sync Mode off is 9.*
test safe-19.8 {autoloading commands indexed in tclIndex files, Sync Mode off} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
} -body {
set i [safe::interpCreate -accessPath [list $tcl_library \
@@ -2275,17 +2275,17 @@ test safe-19.8 {autoloading commands indexed in tclIndex files, Sync Mode off} -
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:1:)} {$p(:2:)} -- 0 ok1 0 ok2 --\
{TCLLIB TESTSDIR/auto0/auto1 TESTSDIR/auto0/auto2*}}
test safe-19.9 {interpConfigure change the access path; tclIndex commands unaffected by token rearrangement (dummy test of doreset), Sync Mode off} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
} -body {
set i [safe::interpCreate -accessPath [list $tcl_library \
@@ -2329,18 +2329,18 @@ test safe-19.9 {interpConfigure change the access path; tclIndex commands unaffe
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:1:)} {$p(:2:)} -- {$p(:2:)} {$p(:1:)} -- 0 ok1 0 ok2 --\
{TCLLIB TESTSDIR/auto0/auto1 TESTSDIR/auto0/auto2*} --\
{TCLLIB TESTSDIR/auto0/auto2 TESTSDIR/auto0/auto1*}}
test safe-19.10 {interpConfigure change the access path; tclIndex commands unaffected by token rearrangement (actual test of doreset), Sync Mode off} -constraints {AutoSyncDefined} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
} -body {
set i [safe::interpCreate -accessPath [list $tcl_library \
@@ -2382,19 +2382,19 @@ test safe-19.10 {interpConfigure change the access path; tclIndex commands unaff
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:1:)} {$p(:2:)} -- {$p(:2:)} {$p(:1:)} --\
0 ok1 0 ok2 --\
{TCLLIB TESTSDIR/auto0/auto1 TESTSDIR/auto0/auto2*} --\
{TCLLIB TESTSDIR/auto0/auto2 TESTSDIR/auto0/auto1*}}
test safe-19.11 {interpConfigure change the access path; pkgIndex.tcl packages unaffected by token rearrangement, Sync Mode off} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
} -body {
# For complete correspondence to safe-stock87-9.11, include auto0 in access path.
@@ -2440,19 +2440,19 @@ test safe-19.11 {interpConfigure change the access path; pkgIndex.tcl packages u
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:2:)} {$p(:3:)} -- {$p(:3:)} {$p(:2:)} -- 0 1.2.3 0 2.3.4 --\
{TCLLIB TESTSDIR/auto0 TESTSDIR/auto0/auto1 TESTSDIR/auto0/auto2*} --\
{TCLLIB TESTSDIR/auto0 TESTSDIR/auto0/auto2 TESTSDIR/auto0/auto1*} --\
0 OK1 0 OK2}
test safe-19.12 {interpConfigure change the access path; pkgIndex.tcl packages unaffected by token rearrangement, safe-19.11 without path auto0, Sync Mode off} -constraints {AutoSyncDefined} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
} -body {
# To manage without path auto0, use an auto_path that is unusual for
@@ -2497,7 +2497,7 @@ test safe-19.12 {interpConfigure change the access path; pkgIndex.tcl packages u
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:1:)} {$p(:2:)} -- {$p(:2:)} {$p(:1:)} --\
0 1.2.3 0 2.3.4 --\
@@ -2505,12 +2505,12 @@ test safe-19.12 {interpConfigure change the access path; pkgIndex.tcl packages u
{TCLLIB TESTSDIR/auto0/auto2 TESTSDIR/auto0/auto1*} --\
0 OK1 0 OK2}
test safe-19.13 {interpConfigure change the access path; pkgIndex.tcl packages fail if directory de-listed, Sync Mode off} -constraints {AutoSyncDefined} -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
} -body {
# Path auto0 added (cf. safe-9.3) because it is needed for auto_path.
@@ -2547,18 +2547,18 @@ test safe-19.13 {interpConfigure change the access path; pkgIndex.tcl packages f
} -cleanup {
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{$p(:2:)} {$p(:3:)} -- 1 {* not found in access path} --\
1 {* not found in access path} -- 1 1 --\
{TCLLIB TESTSDIR/auto0 TESTSDIR/auto0/auto1 TESTSDIR/auto0/auto2*} -- {TCLLIB*}}
test safe-19.20 {check module loading, Sync Mode off} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
set oldTm [tcl::tm::path list]
foreach path $oldTm {
@@ -2593,7 +2593,7 @@ test safe-19.20 {check module loading, Sync Mode off} -constraints AutoSyncDefin
}
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{{$p(:1:)} {$p(:2:)} {$p(:3:)}} -- {{$p(:1:)}} --\
0 0.5 0 1.0 0 2.0 --\
@@ -2601,12 +2601,12 @@ test safe-19.20 {check module loading, Sync Mode off} -constraints AutoSyncDefin
TESTSDIR/auto0/modules/mod2} -- res0 res1 res2}
# See comments on lsort after test safe-9.20.
test safe-19.21 {interpConfigure change the access path; check module loading, Sync Mode off; stale data case 1} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
set oldTm [tcl::tm::path list]
foreach path $oldTm {
@@ -2661,7 +2661,7 @@ test safe-19.21 {interpConfigure change the access path; check module loading, S
}
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{{$p(:1:)} {$p(:2:)} {$p(:3:)}} -- {{$p(:1:)}} --\
{{$p(:3:)} {$p(:4:)} {$p(:5:)}} -- {{$p(:3:)}} --\
@@ -2673,12 +2673,12 @@ test safe-19.21 {interpConfigure change the access path; check module loading, S
res0 res1 res2}
# See comments on lsort after test safe-9.20.
test safe-19.22 {interpConfigure change the access path; check module loading, Sync Mode off; stale data case 0} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
set oldTm [tcl::tm::path list]
foreach path $oldTm {
@@ -2728,7 +2728,7 @@ test safe-19.22 {interpConfigure change the access path; check module loading, S
}
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{{$p(:1:)} {$p(:2:)} {$p(:3:)}} -- {{$p(:1:)}} --\
{{$p(:3:)} {$p(:4:)} {$p(:5:)}} -- {{$p(:3:)}} --\
@@ -2740,12 +2740,12 @@ test safe-19.22 {interpConfigure change the access path; check module loading, S
res0 res1 res2}
# See comments on lsort after test safe-9.20.
test safe-19.23 {interpConfigure change the access path; check module loading, Sync Mode off; stale data case 3} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
set oldTm [tcl::tm::path list]
foreach path $oldTm {
@@ -2805,7 +2805,7 @@ test safe-19.23 {interpConfigure change the access path; check module loading, S
}
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{{$p(:1:)} {$p(:2:)} {$p(:3:)}} -- {{$p(:1:)}} --\
{{$p(:3:)} {$p(:4:)} {$p(:5:)}} -- {{$p(:3:)}} --\
@@ -2817,12 +2817,12 @@ test safe-19.23 {interpConfigure change the access path; check module loading, S
res0 res1 res2}
# See comments on lsort after test safe-9.20.
test safe-19.24 {interpConfigure change the access path; check module loading, Sync Mode off; stale data case 2 (worst case)} -constraints AutoSyncDefined -setup {
- set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
+ set SyncExists [expr {[info commands ::safe::setSyncMode] ne {}}]
if {$SyncExists} {
- set SyncVal_TMP [safe::setAutoPathSync]
- safe::setAutoPathSync 0
+ set SyncVal_TMP [safe::setSyncMode]
+ safe::setSyncMode 0
} else {
- error {This test is meaningful only if the command ::safe::setAutoPathSync is defined}
+ error {This test is meaningful only if the command ::safe::setSyncMode is defined}
}
set oldTm [tcl::tm::path list]
foreach path $oldTm {
@@ -2877,7 +2877,7 @@ test safe-19.24 {interpConfigure change the access path; check module loading, S
}
safe::interpDelete $i
if {$SyncExists} {
- safe::setAutoPathSync $SyncVal_TMP
+ safe::setSyncMode $SyncVal_TMP
}
} -match glob -result {{{$p(:1:)} {$p(:2:)} {$p(:3:)}} -- {{$p(:1:)}} --\
{{$p(:3:)} {$p(:4:)} {$p(:5:)}} -- {{$p(:3:)}} --\