diff options
Diffstat (limited to 'tests/winFCmd.test')
-rw-r--r-- | tests/winFCmd.test | 82 |
1 files changed, 81 insertions, 1 deletions
diff --git a/tests/winFCmd.test b/tests/winFCmd.test index e2575dd..24fbf8e 100644 --- a/tests/winFCmd.test +++ b/tests/winFCmd.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: winFCmd.test,v 1.41 2006/11/03 00:34:53 hobbs Exp $ +# RCS: @(#) $Id: winFCmd.test,v 1.42 2007/02/20 15:36:47 patthoyts Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -1152,6 +1152,86 @@ test winFCmd-18.8 {Windows reserved path names} -constraints win -body { } -result COM1 +test winFCmd-19.1 {Windows extended path names} -constraints nt -body { + file normalize //?/c:/windows/win.ini +} -result //?/c:/windows/win.ini + +test winFCmd-19.2 {Windows extended path names} -constraints nt -body { + file normalize //?/c:/windows/../windows/win.ini +} -result //?/c:/windows/win.ini + +test winFCmd-19.3 {Windows extended path names} -constraints nt -setup { + set tmpfile [file join $::env(TEMP) tcl[string repeat x 20].tmp] + set tmpfile [file normalize $tmpfile] +} -body { + list [catch { + set f [open $tmpfile [list WRONLY CREAT]] + close $f + } res] $res +} -cleanup { + catch {file delete $tmpfile} +} -result [list 0 {}] + +test winFCmd-19.4 {Windows extended path names} -constraints nt -setup { + set tmpfile [file join $::env(TEMP) tcl[string repeat x 20].tmp] + set tmpfile //?/[file normalize $tmpfile] +} -body { + list [catch { + set f [open $tmpfile [list WRONLY CREAT]] + close $f + } res] $res +} -cleanup { + catch {file delete $tmpfile} +} -result [list 0 {}] + +test winFCmd-19.5 {Windows extended path names} -constraints nt -setup { + set tmpfile [file join $::env(TEMP) tcl[string repeat x 248].tmp] + set tmpfile [file normalize $tmpfile] +} -body { + list [catch { + set f [open $tmpfile [list WRONLY CREAT]] + close $f + } res] errormsg ;#$res +} -cleanup { + catch {file delete $tmpfile} +} -result [list 1 errormsg] + +test winFCmd-19.6 {Windows extended path names} -constraints nt -setup { + set tmpfile [file join $::env(TEMP) tcl[string repeat x 248].tmp] + set tmpfile //?/[file normalize $tmpfile] +} -body { + list [catch { + set f [open $tmpfile [list WRONLY CREAT]] + close $f + } res] $res +} -cleanup { + catch {file delete $tmpfile} +} -result [list 0 {}] + +test winFCmd-19.7 {Windows extended path names} -constraints nt -setup { + set tmpfile [file join $::env(TEMP) "tcl[pid].tmp "] + set tmpfile [file normalize $tmpfile] +} -body { + list [catch { + set f [open $tmpfile [list WRONLY CREAT]] + close $f + } res] $res [glob -directory $::env(TEMP) -tails tcl[pid].*] +} -cleanup { + catch {file delete $tmpfile} +} -result [list 0 {} [list tcl[pid].tmp]] + +test winFCmd-19.8 {Windows extended path names} -constraints nt -setup { + set tmpfile [file join $::env(TEMP) "tcl[pid].tmp "] + set tmpfile //?/[file normalize $tmpfile] +} -body { + list [catch { + set f [open $tmpfile [list WRONLY CREAT]] + close $f + } res] $res [glob -directory $::env(TEMP) -tails tcl[pid].*] +} -cleanup { + catch {file delete $tmpfile} +} -result [list 0 {} [list "tcl[pid].tmp "]] + # This block of code used to occur after the "return" call, so I'm # commenting it out and assuming that this code is still under construction. #foreach source {tef ted tnf tnd "" nul com1} { |