From: Vince Darley Date: Fri, 26 Apr 2002 12:09:58 +0000 (+0000) Subject: better tests X-Git-Tag: vfs-1-2~52 X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=54da039d136d140dc879207f12254bba5fe411f6;p=tclvfs better tests --- diff --git a/tests/vfs.test b/tests/vfs.test index c6e4215..cb59db9 100644 --- a/tests/vfs.test +++ b/tests/vfs.test @@ -27,7 +27,7 @@ proc filelistrelative {filelist {remove ""}} { } set filelist $newlist } - set dir [file normalize [file dirname [info script]]] + set dir [file normalize [pwd]] set len [string length $dir] incr len set res {} diff --git a/tests/vfsFtp.test b/tests/vfsFtp.test index 461a716..b264141 100644 --- a/tests/vfsFtp.test +++ b/tests/vfsFtp.test @@ -24,19 +24,28 @@ if {![auto_load ::vfs::ftp::Mount]} { puts stdout "These tests require an internet connection, and might" puts stdout "take a long time to complete." -test vfsFtp-1.1 {mount and source} { - set dir [pwd] +set dir [pwd] + +test vfsFtp-1.1 {mount and cd} { vfs::ftp::Mount ftp://ftp.ucsd.edu/pub/alpha/ localmount - cd localmount ; cd tcl - set res [source vfsTest.tcl] - cd $dir - set res + cd localmount + cd tcl + file tail [pwd] +} {tcl} + +test vfsFtp-1.2 {mount and glob} { + glob -nocomplain vfsTest.tcl +} {vfsTest.tcl} + +test vfsFtp-1.3 {mount and source} { + source vfsTest.tcl } {This was returned from a remote file} # cleanup catch { vfs::ftp::Unmount ftp://ftp.ucsd.edu/pub/alpha/ localmount } +cd $dir ::tcltest::cleanupTests return