From: Vince Darley Date: Thu, 8 Nov 2001 10:47:39 +0000 (+0000) Subject: better vfs interps X-Git-Tag: vfs-1-2~84 X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=fb797f8241958db8ccdd46e92f8d4f7c983ae428;p=tclvfs better vfs interps --- diff --git a/tests/vfs.test b/tests/vfs.test index 959194a..c1df56c 100644 --- a/tests/vfs.test +++ b/tests/vfs.test @@ -18,6 +18,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} { package require vfs test vfs-1.1 {mount unmount} { + catch {unset res} vfs::filesystem mount foo bar set res [list [catch {vfs::filesystem unmount foo bar} err]] lappend res $err @@ -26,6 +27,26 @@ test vfs-1.1 {mount unmount} { set res } {1 {wrong # args: should be "vfs::filesystem unmount path"}} + +# Test 2.x sub-interps + +vfs::filesystem mount foo bar + +test vfs-2.1 {mount unmount} { + catch {interp delete a} + catch {unset res} + interp create a + a eval {package require vfs} + a eval {vfs::filesystem mount foo2 bar2} + lappend res [vfs::filesystem info] + a eval {vfs::filesystem unmount foo2} + lappend res [vfs::filesystem info] + set res +} {{C:/Tcl-source/tclvfs/tests/foo2 C:/Tcl-source/tclvfs/tests/foo}\ + C:/Tcl-source/tclvfs/tests/foo} + +vfs::filesystem unmount foo + # cleanup ::tcltest::cleanupTests return