summaryrefslogtreecommitdiffstats
path: root/tests/fCmd.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-10-17 19:51:47 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-10-17 19:51:47 (GMT)
commit7ff2e897ae1fc728e90693e12424a3465dff3a14 (patch)
treef7526e3966ad91dbb1472bdcdcb21fde193f4d4e /tests/fCmd.test
parent0cce329c1cc93dbdb8a4d0d5bc2fb4232ca38950 (diff)
downloadtcl-7ff2e897ae1fc728e90693e12424a3465dff3a14.zip
tcl-7ff2e897ae1fc728e90693e12424a3465dff3a14.tar.gz
tcl-7ff2e897ae1fc728e90693e12424a3465dff3a14.tar.bz2
Fix test-cases running on Windows 10: [string index $tcl_platform(osVersion) 0] doesn't give the correct answer then (it gives "1", but "10" was expected)
Diffstat (limited to 'tests/fCmd.test')
-rw-r--r--tests/fCmd.test18
1 files changed, 9 insertions, 9 deletions
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