From 19783d89c658745b7ae9c7bf9cfe5073233c7165 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 23 Jul 2012 14:20:15 +0000 Subject: Bug #3547593: fcmd test failures on Windows 7 WOW64 --- tests/winFCmd.test | 58 +++++++++--------------------------------------------- 1 file changed, 9 insertions(+), 49 deletions(-) diff --git a/tests/winFCmd.test b/tests/winFCmd.test index 58a1b11..4e816a8 100644 --- a/tests/winFCmd.test +++ b/tests/winFCmd.test @@ -17,8 +17,6 @@ if {[lsearch [namespace children] ::tcltest] == -1} { # Initialise the test constraints -testConstraint win2000orXP 0 -testConstraint winOlderThan2000 0 testConstraint testvolumetype [llength [info commands testvolumetype]] testConstraint testfile [llength [info commands testfile]] testConstraint testchmod [llength [info commands testchmod]] @@ -52,15 +50,6 @@ proc cleanup {args} { } } -if {[testConstraint winOnly]} { - if {[testConstraint nt] && [string index $tcl_platform(osVersion) 0]==5} { - # Warning: Win 6 will break this! - testConstraint win2000orXP 1 - } else { - testConstraint winOlderThan2000 1 - } -} - # find a CD-ROM so we can test read-only filesystems. proc findfile {dir} { @@ -188,18 +177,10 @@ test winFCmd-1.12 {TclpRenameFile: errno: EACCES} {win testfile} { close $fd set msg } {1 EACCES} -test winFCmd-1.13 {TclpRenameFile: errno: EACCES} {win win2000orXP testfile} { +test winFCmd-1.13 {TclpRenameFile: errno: EINVAL|EACCES|ENOENT} -constraints {win testfile} -body { cleanup list [catch {testfile mv nul tf1} msg] $msg -} {1 EINVAL} -test winFCmd-1.13.1 {TclpRenameFile: errno: EACCES} {win nt winOlderThan2000 testfile} { - cleanup - list [catch {testfile mv nul tf1} msg] $msg -} {1 EACCES} -test winFCmd-1.13.2 {TclpRenameFile: errno: ENOENT} {win 95 testfile} { - cleanup - list [catch {testfile mv nul tf1} msg] $msg -} {1 ENOENT} +} -match regexp -result {1 (EINVAL|EACCES|ENOENT)} test winFCmd-1.14 {TclpRenameFile: errno: EACCES} {win 95 testfile} { cleanup createfile tf1 @@ -224,18 +205,10 @@ test winFCmd-1.18 {TclpRenameFile: srcAttr == -1} {win testfile} { cleanup list [catch {testfile mv tf1 tf2} msg] $msg } {1 ENOENT} -test winFCmd-1.19 {TclpRenameFile: errno == EACCES} {win win2000orXP testfile} { - cleanup - list [catch {testfile mv nul tf1} msg] $msg -} {1 EINVAL} -test winFCmd-1.19.1 {TclpRenameFile: errno == EACCES} {win nt winOlderThan2000 testfile} { - cleanup - list [catch {testfile mv nul tf1} msg] $msg -} {1 EACCES} -test winFCmd-1.19.2 {TclpRenameFile: errno == ENOENT} {win 95 testfile} { +test winFCmd-1.19 {TclpRenameFile: errno == EINVAL|EACCES|ENOENT} -constraints {win testfile} -body { cleanup list [catch {testfile mv nul tf1} msg] $msg -} {1 ENOENT} +} -match regexp -result {1 (EINVAL|EACCES|ENOENT)} test winFCmd-1.20 {TclpRenameFile: src is dir} {win nt testfile} { # under 95, this would actually succeed and move the current dir out from # under the current process! @@ -377,18 +350,10 @@ test winFCmd-2.7 {TclpCopyFile: errno: EACCES} {win 95 testfile} { close $fd set msg } {1 EACCES} -test winFCmd-2.8 {TclpCopyFile: errno: EACCES} {win win2000orXP testfile} { - cleanup - list [catch {testfile cp nul tf1} msg] $msg -} {1 EINVAL} -test winFCmd-2.8.1 {TclpCopyFile: errno: EACCES} {win nt winOlderThan2000 testfile} { +test winFCmd-2.8 {TclpCopyFile: errno: EINVAL|EACCES|ENOENT} -constraints {win testfile} -body { cleanup list [catch {testfile cp nul tf1} msg] $msg -} {1 EACCES} -test winFCmd-2.9 {TclpCopyFile: errno: ENOENT} {win 95 testfile} { - cleanup - list [catch {testfile cp nul tf1} msg] $msg -} {1 ENOENT} +} -match regexp -result {1 (EINVAL|EACCES|ENOENT)} test winFCmd-2.10 {TclpCopyFile: CopyFile succeeds} {win testfile} { cleanup createfile tf1 tf1 @@ -741,17 +706,12 @@ test winFCmd-7.13 {TraverseWinTree: append \ to target if necessary} {win testfi createfile td1/tf1 tf1 testfile cpdir td1 td2 contents td2/tf1 -} {tf1} -test winFCmd-7.14 {TraverseWinTree: append \ to target if necessary} {win 95 testfile} { - cleanup - file mkdir td1 - list [catch {testfile cpdir td1 /} msg] $msg -} {1 {/ EEXIST}} -test winFCmd-7.15 {TraverseWinTree: append \ to target if necessary} {win nt testfile} { +} {tf1} +test winFCmd-7.14 {TraverseWinTree: append \ to target if necessary} -constraints {win testfile} -body { cleanup file mkdir td1 list [catch {testfile cpdir td1 /} msg] $msg -} {1 {/ EACCES}} +} -match regexp -result {1 {/ EEXIST|EACCES}} test winFCmd-7.16 {TraverseWinTree: recurse on files: no files} {win testfile} { cleanup file mkdir td1 -- cgit v0.12