summaryrefslogtreecommitdiffstats
path: root/tests/fileName.test
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2006-03-21 11:12:26 (GMT)
committerdkf <dkf@noemail.net>2006-03-21 11:12:26 (GMT)
commit3a82d5373c75113e70d9803c59fdfbaf6af99634 (patch)
treecb78904bbef94025a4f19257afc9211ee618e8ce /tests/fileName.test
parent1358da471fe59ed5173bdbb4fea8d95cc3c328b7 (diff)
downloadtcl-3a82d5373c75113e70d9803c59fdfbaf6af99634.zip
tcl-3a82d5373c75113e70d9803c59fdfbaf6af99634.tar.gz
tcl-3a82d5373c75113e70d9803c59fdfbaf6af99634.tar.bz2
Use test constraints properly instead of looking in tcl_platform
Consistent method of calling test constraints, and (try to) move constraint setup to the top of the test file FossilOrigin-Name: 36829d55d6ebcac6be4d3d7d887b06650a5b394a
Diffstat (limited to 'tests/fileName.test')
-rw-r--r--tests/fileName.test30
1 files changed, 12 insertions, 18 deletions
diff --git a/tests/fileName.test b/tests/fileName.test
index 5e4286e..4cd079b 100644
--- a/tests/fileName.test
+++ b/tests/fileName.test
@@ -10,15 +10,24 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: fileName.test,v 1.50 2006/03/19 23:04:24 vincentdarley Exp $
+# RCS: @(#) $Id: fileName.test,v 1.51 2006/03/21 11:12:29 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
namespace import -force ::tcltest::*
}
-testConstraint testsetplatform [string equal testsetplatform [info commands testsetplatform]]
-testConstraint testtranslatefilename [string equal testtranslatefilename [info commands testtranslatefilename]]
+testConstraint testsetplatform [llength [info commands testsetplatform]]
+testConstraint testtranslatefilename [llength [info commands testtranslatefilename]]
+testConstraint linkDirectory 1
+testConstraint symbolicLinkFile 1
+if {[testConstraint win]} {
+ if {[string index $tcl_platform(osVersion) 0] < 5 \
+ || [lindex [file system [temporaryDirectory]] 1] ne "NTFS"} {
+ testConstraint linkDirectory 0
+ }
+ testConstraint symbolicLinkFile 0
+}
global env
if {[testConstraint testsetplatform]} {
@@ -778,21 +787,6 @@ test filename-11.17.1 {Tcl_GlobCmd} {win} {
[file join $globname x,z1.c]\
[file join $globname x1.c]\
[file join $globname y1.c] [file join $globname z1.c]]]]
-if {[string equal $tcl_platform(platform) "windows"]} {
- if {[string index $tcl_platform(osVersion) 0] >= 5 \
- && ([lindex [file system [temporaryDirectory]] 1] == "NTFS")} {
- testConstraint linkDirectory 1
- } else {
- testConstraint linkDirectory 0
- }
-} else {
- testConstraint linkDirectory 1
-}
-if {[string equal $tcl_platform(platform) "windows"]} {
- testConstraint symbolicLinkFile 0
-} else {
- testConstraint symbolicLinkFile 1
-}
test filename-11.17.2 {Tcl_GlobCmd} {notRoot linkDirectory} {
set dir [pwd]
set ret "error in test"