diff options
-rw-r--r-- | tests/cmdAH.test | 2 | ||||
-rw-r--r-- | tests/fCmd.test | 18 | ||||
-rw-r--r-- | tests/fileName.test | 2 | ||||
-rw-r--r-- | tests/winFCmd.test | 5 |
4 files changed, 13 insertions, 14 deletions
diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 45a867a..6cc8c0f 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -20,7 +20,7 @@ testConstraint testsetplatform [llength [info commands testsetplatform]] testConstraint testvolumetype [llength [info commands testvolumetype]] testConstraint linkDirectory [expr { ![testConstraint win] || - ([string index $tcl_platform(osVersion) 0] >= 5 + ($::tcl_platform(osVersion) >= 5.0 && [lindex [file system [temporaryDirectory]] 1] eq "NTFS") }] diff --git a/tests/fCmd.test b/tests/fCmd.test index 2860001..f53128d 100644 --- a/tests/fCmd.test +++ b/tests/fCmd.test @@ -50,11 +50,10 @@ if {[testConstraint unix]} { # Also used in winFCmd... if {[testConstraint winOnly]} { - set major [string index $tcl_platform(osVersion) 0] - if {[testConstraint nt] && $major > 4} { - if {$major > 5} { + if {[testConstraint nt] && $::tcl_platform(osVersion) >= 5.0} { + if {$::tcl_platform(osVersion) >= 6.0} { testConstraint winVista 1 - } elseif {$major == 5} { + } else { testConstraint win2000orXP 1 } } else { @@ -62,10 +61,11 @@ if {[testConstraint winOnly]} { } } -testConstraint darwin9 [expr {[testConstraint unix] && - $tcl_platform(os) eq "Darwin" && - int([string range $tcl_platform(osVersion) 0 \ - [string first . $tcl_platform(osVersion)]]) >= 9}] +testConstraint darwin9 [expr { + [testConstraint unix] + && $tcl_platform(os) eq "Darwin" + && [package vsatisfies 1.$::tcl_platform(osVersion) 1.9] +}] testConstraint notDarwin9 [expr {![testConstraint darwin9]}] testConstraint fileSharing 0 @@ -2282,7 +2282,7 @@ test fCmd-27.6 {TclFileAttrsCmd - setting more than one option} -setup { if { [testConstraint win] && - ([string index $tcl_platform(osVersion) 0] < 5 + ($::tcl_platform(osVersion) < 5.0 || [lindex [file system [temporaryDirectory]] 1] ne "NTFS") } then { testConstraint linkDirectory 0 diff --git a/tests/fileName.test b/tests/fileName.test index 0851e94..a4c8efe 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -20,7 +20,7 @@ testConstraint testtranslatefilename [llength [info commands testtranslatefilena testConstraint linkDirectory 1 testConstraint symbolicLinkFile 1 if {[testConstraint win]} { - if {[string index $tcl_platform(osVersion) 0] < 5 \ + if {$::tcl_platform(osVersion) < 5.0 \ || [lindex [file system [temporaryDirectory]] 1] ne "NTFS"} { testConstraint linkDirectory 0 } diff --git a/tests/winFCmd.test b/tests/winFCmd.test index f1f2afa..f93f225 100644 --- a/tests/winFCmd.test +++ b/tests/winFCmd.test @@ -53,10 +53,9 @@ proc cleanup {args} { } if {[testConstraint win]} { - set major [string index $tcl_platform(osVersion) 0] - if {$major > 5} { + if {$::tcl_platform(osVersion) >= 5.0} { testConstraint winVista 1 - } elseif {$major == 5} { + } elseif {$::tcl_platform(osVersion) >= 4.0} { testConstraint winXP 1 } } |