summaryrefslogtreecommitdiffstats
path: root/tests/fCmd.test
diff options
context:
space:
mode:
authornijtmans <nijtmans>2009-11-23 20:17:36 (GMT)
committernijtmans <nijtmans>2009-11-23 20:17:36 (GMT)
commit1e53451f28489099ede27c46d8672b7281e44614 (patch)
tree9f5d34f3682d12c06c74e9e2929d7b3d4c6afb00 /tests/fCmd.test
parenta572d7070900a843d0b8cc6c6bee105f8411c90c (diff)
downloadtcl-1e53451f28489099ede27c46d8672b7281e44614.zip
tcl-1e53451f28489099ede27c46d8672b7281e44614.tar.gz
tcl-1e53451f28489099ede27c46d8672b7281e44614.tar.bz2
#undef STATIC_BUILD in tclWin(Dde|Reg).c, in order to make
sure that Xxxxx_Init is always exported even when Tcl is built static (otherwise we cannot create a DLL). tclThreadTest.c: Make all functions static, except TclThread_Init. fCmd.test Enable fCmd-30.1 when registry is available. tcl.m4 Fix ${SHLIB_LD_LIBS} definition, fix conflicts configure.in between static libraries and import library on windows. configure (regenerated) Makefile.in Simplifications related to tcl.m4 changes.
Diffstat (limited to 'tests/fCmd.test')
-rw-r--r--tests/fCmd.test23
1 files changed, 17 insertions, 6 deletions
diff --git a/tests/fCmd.test b/tests/fCmd.test
index 53360b3..839d0fd 100644
--- a/tests/fCmd.test
+++ b/tests/fCmd.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: fCmd.test,v 1.66 2009/11/07 09:24:22 patthoyts Exp $
+# RCS: @(#) $Id: fCmd.test,v 1.67 2009/11/23 20:17:36 nijtmans Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -27,7 +27,18 @@ testConstraint winOlderThan2000 0
testConstraint notNetworkFilesystem 0
testConstraint 95or98 [expr {[testConstraint 95] || [testConstraint 98]}]
testConstraint 2000orNewer [expr {![testConstraint 95or98]}]
-testConstraint registryPackage [expr {![catch {package require registry}]}]
+testConstraint reg 0
+if {[testConstraint win]} {
+ catch {
+ # Is the registry extension already static to this shell?
+ if [catch {load {} Registry; set ::reglib {}}] {
+ # try the location given to use on the commandline to tcltest
+ ::tcltest::loadTestedCommands
+ load $::reglib Registry
+ }
+ testConstraint reg 1
+ }
+}
# Find a group that exists on this Unix system, or else skip tests that
# require Unix groups.
@@ -1025,7 +1036,7 @@ test fCmd-10.3 {file copy: comprehensive: dir to new name} -setup {
} -result [list {td1 td2 td3 td4} [file join td3 tdx] [file join td4 tdy] 1 0]
test fCmd-10.3.1 {file copy: comprehensive: dir to new name} -setup {
cleanup
-} -constraints {notRoot win 2000orNewer testchmod} -body {
+} -constraints {notRoot 2000orNewer testchmod} -body {
# On Windows with ACLs, copying a directory is defined like this
file mkdir [file join td1 tdx]
file mkdir [file join td2 tdy]
@@ -1124,7 +1135,7 @@ test fCmd-10.8 {file rename: comprehensive: dir to new name and dir} -setup {
} -result [subst {{td1 td2 td3} {[file join td3 td3] [file join td3 td4]} 1 0}]
test fCmd-10.8.1 {file rename: comprehensive: dir to new name and dir} -setup {
cleanup
-} -constraints {notRoot win 2000orNewer testchmod} -body {
+} -constraints {notRoot 2000orNewer testchmod} -body {
# On Windows with ACLs, copying a directory is defined like this
file mkdir td1
file mkdir td2
@@ -2538,10 +2549,10 @@ removeDirectory abc.dir
test fCmd-30.1 {file writable on 'My Documents'} -setup {
# Get the localized version of the folder name by looking in the registry.
set mydocsname [registry get {HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DocFolderPaths} $tcl_platform(user)]
-} -constraints {win 2000orNewer registryPackage} -body {
+} -constraints {2000orNewer reg} -body {
file writable $mydocsname
} -result 1
-test fCmd-30.2 {file readable on 'NTUSER.DAT'} -constraints {win 2000orNewer knownBug} -body {
+test fCmd-30.2 {file readable on 'NTUSER.DAT'} -constraints {2000orNewer knownBug} -body {
# Apparently the OS has this file open with exclusive permissions Windows
# doesn't provide any way to determine that fact without actually trying
# to open the file (open NTUSER.dat r), which fails. Hence this isn't