diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2011-01-01 15:14:42 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2011-01-01 15:14:42 (GMT) |
commit | a6cdf257c61c62aa64357851af8f6e376b7f8881 (patch) | |
tree | 06031b0878fe01f3aa9ec4610a723046d9c4fe24 /tests/fileName.test | |
parent | 52a3d5af143656324d78483b244f92addfbe6176 (diff) | |
download | tcl-a6cdf257c61c62aa64357851af8f6e376b7f8881.zip tcl-a6cdf257c61c62aa64357851af8f6e376b7f8881.tar.gz tcl-a6cdf257c61c62aa64357851af8f6e376b7f8881.tar.bz2 |
Clean up of tests and conversion to tcltest 2. Target has been to get init and
cleanup code out of the test body and into the -setup/-cleanup stanzas.
Diffstat (limited to 'tests/fileName.test')
-rw-r--r-- | tests/fileName.test | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/tests/fileName.test b/tests/fileName.test index d46391a..c7c591d 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -10,9 +10,9 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.66 2010/01/05 18:58:36 dgp Exp $ +# RCS: @(#) $Id: fileName.test,v 1.67 2011/01/01 15:14:43 dkf Exp $ -if {[lsearch [namespace children] ::tcltest] == -1} { +if {"::tcltest" ni [namespace children]} { package require tcltest 2 namespace import -force ::tcltest::* } @@ -42,7 +42,7 @@ global env if {[testConstraint testsetplatform]} { set platform [testgetplatform] } - + # Caution: when using 'testsetplatform' to test different file name platform # descriptions in this file, one must be very careful not to combine such # platform manipulation with commands like 'cd', 'pwd'. That is because the @@ -1434,7 +1434,7 @@ test filename-16.13 {windows specific globbing} {win sharedCdrive} { } //[info hostname]/c/globTest test filename-16.14 {windows specific globbing} {win} { cd [lindex [glob -types d -dir C:/ *] 0] - expr {[lsearch -exact [glob {{.,*}*}] ".."] != -1} + expr {".." in [glob {{.,*}*}]} } {1} test filename-16.15 {windows specific globbing} {win} { cd [lindex [glob -types d -dir C:/ *] 0] @@ -1529,7 +1529,6 @@ test fileName-20.4 {Bug 1750300} -setup { removeFile TAGS $d removeDirectory foo } -result 0 - test fileName-20.5 {Bug 2837800} -setup { set dd [makeDirectory isolate] set d [makeDirectory ./~foo $dd] @@ -1544,7 +1543,6 @@ test fileName-20.5 {Bug 2837800} -setup { removeDirectory ./~foo $dd removeDirectory isolate } -result ~foo/test - test fileName-20.6 {Bug 2837800} -setup { # Recall that we have $env(HOME) set so that references # to ~ point to [temporaryDirectory] @@ -1561,7 +1559,6 @@ test fileName-20.6 {Bug 2837800} -setup { removeDirectory isolate removeFile test ~ } -result {} - test fileName-20.7 {Bug 2806250} -setup { set savewd [pwd] cd [temporaryDirectory] @@ -1574,7 +1571,6 @@ test fileName-20.7 {Bug 2806250} -setup { removeDirectory isolate cd $savewd } -result 1 - test fileName-20.8 {Bug 2806250} -setup { set savewd [pwd] cd [temporaryDirectory] @@ -1587,8 +1583,7 @@ test fileName-20.8 {Bug 2806250} -setup { removeDirectory isolate cd $savewd } -result ./~test - -test fileName-20.9 {} -setup { +test fileName-20.9 {globbing for special chars} -setup { makeFile {} test ~ set d [makeDirectory isolate] set savewd [pwd] @@ -1600,8 +1595,7 @@ test fileName-20.9 {} -setup { removeDirectory isolate removeFile test ~ } -result ~/test - -test fileName-20.10 {} -setup { +test fileName-20.10 {globbing for special chars} -setup { set s [makeDirectory sub ~] makeFile {} fileName-20.10 $s set d [makeDirectory isolate] @@ -1615,7 +1609,7 @@ test fileName-20.10 {} -setup { removeFile fileName-20.10 $s removeDirectory sub ~ } -result ~/sub/fileName-20.10 - + # cleanup catch {file delete -force C:/globTest} cd [temporaryDirectory] |