diff options
author | sebres <sebres@users.sourceforge.net> | 2018-04-09 19:50:12 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2018-04-09 19:50:12 (GMT) |
commit | a9ef86f152a4cda4acf25dbb79dbd9cd18449458 (patch) | |
tree | 1f036d6c2baadc7cd9b67ceac71deae44861624a /tests/fileName.test | |
parent | 24a04c081909c75252c8def939e0473206550302 (diff) | |
download | tcl-a9ef86f152a4cda4acf25dbb79dbd9cd18449458.zip tcl-a9ef86f152a4cda4acf25dbb79dbd9cd18449458.tar.gz tcl-a9ef86f152a4cda4acf25dbb79dbd9cd18449458.tar.bz2 |
win: fix several test-cases for windows platform
Diffstat (limited to 'tests/fileName.test')
-rw-r--r-- | tests/fileName.test | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/fileName.test b/tests/fileName.test index d224011..0851e94 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -770,6 +770,7 @@ test filename-11.16 {Tcl_GlobCmd} { set globname "globTest" set horribleglobname "glob\[\{Test" +set tildeglobname "./~test.txt" test filename-11.17 {Tcl_GlobCmd} {unix} { list [catch {lsort [glob -directory $globname *]} msg] $msg @@ -940,11 +941,11 @@ test filename-11.21.1 {Tcl_GlobCmd} { # Get rid of file/dir if it exists, since it will have # been left behind by a previous failed run. -if {[file exists $horribleglobname]} { - file delete -force $horribleglobname -} +file delete -force $horribleglobname file rename globTest $horribleglobname set globname $horribleglobname +file delete -force $tildeglobname +close [open $tildeglobname w] test filename-11.22 {Tcl_GlobCmd} {unix} { list [catch {lsort [glob -dir $globname *]} msg] $msg @@ -1067,7 +1068,9 @@ test filename-11.41 {Tcl_GlobCmd} { test filename-11.42 {Tcl_GlobCmd} { set res [list] foreach f [glob -dir [pwd] *] { - lappend res [file tail $f] + set f [file tail $f] + regsub {^./} $f {} f; # until glob bug [2511011fff] don't fixed (tilde expansion prevention). + lappend res $f } expr {$res == [glob *]} } {1} @@ -1109,8 +1112,9 @@ test filename-11.49 {Tcl_GlobCmd} { } {1 {bad argument to "-types": abcde}} file rename $horribleglobname globTest +file delete -force $tildeglobname set globname globTest -unset horribleglobname +unset horribleglobname tildeglobname test filename-12.1 {simple globbing} {unixOrPc} { list [catch {glob {}} msg] $msg |