puts stdout "These tests require an internet connection, and might"
puts stdout "take a long time to complete."
+set vfsTestDir [pwd]
+if {![file writable $vfsTestDir]} {
+ if {[info exists env(TEMP)] && [file writable $env(TEMP)]} {
+ set vfsTestDir $env(TEMP)
+ tcltest::testConstraint vfsWritable 1
+ puts stdout "Using temporary directory for some files"
+ } else {
+ tcltest::testConstraint vfsWritable 0
+ }
+} else {
+ tcltest::testConstraint vfsWritable 1
+}
+
test vfsUrl-1.1 {mount} {
vfs::urltype::Mount ftp
} {Mounted at "ftp://"}
test vfsUrl-2.1 {auto-mount ftp and copy file} {
file delete -force README.tclversions
- file copy ftp://ftp.scriptics.com/pub/tcl/README.tclversions .
- set to README.tclversions
+ file copy ftp://ftp.scriptics.com/pub/tcl/README.tclversions $vfsTestDir
+ set to [file join $vfsTestDir README.tclversions]
if {[file exists $to]} {
if {[file size $to] < 800} {
set res "file too short"
} {ok}
test vfsUrl-2.2 {auto-mount bad ftp} {
- catch {file copy ftp://ftp.scriptxxics.com/pub/tcl/README.tclversions .}
- set to README.tclversions
+ catch {file copy ftp://ftp.scriptxxics.com/pub/tcl/README.tclversions $vfsTestDir}
+ set to [file join $vfsTestDir README.tclversions]
if {[file exists $to]} {
set res "file shouldn't exist!"
file delete -force $to