[Tclresource-commits] Extras/Tests FilesCmd.test,NONE,1.1
Status: Beta
Brought to you by:
bdesgraupes
From: Bernard D. <bde...@us...> - 2004-09-06 07:02:04
|
Update of /cvsroot/tclresource/Extras/Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29342/Extras/Tests Added Files: FilesCmd.test Log Message: First checkin --- NEW FILE: FilesCmd.test --- # ------------------------------------------------------- # File: "FilesCmd.test" # Created: 2004-09-05 20:16:33 # Last modification: 2004-09-06 06:50:46 # Author: Bernard Desgraupes # e-mail: <bde...@ea...> # www: <http://webperso.easyconnect.fr/bdesgraupes/> # (c) Copyright: Bernard Desgraupes, 2004 # All rights reserved. # This software is free software with BSD licence. # Versions history: see the Changes.Log file. # # Test suite for the Tcl [resource files] command defined # in the Tclresource extension. # # $Date: 2004/09/06 07:01:55 $ # $Revision: 1.1 $ # ------------------------------------------------------- source [file join [file dir [info script]] common.tcl] namespace eval ::resource::test { namespace import ::tcltest::* test ResourceFiles-1-1 {New ref at start of list} -setup { set rid [resource open $resfileDF] } -body { set ref [lindex [resource files] 0] set res [expr {$ref eq $rid}] } -cleanup { resource close $rid } -result 1 test ResourceFiles-1-2 {Get path corresponding to ref} -setup { } -body { set rid [resource open $resfileDF] set path [resource files $rid] resource close $rid set path } -cleanup { } -result [set resfileDF] # test ResourceFiles-1-3 {} -setup { # } -body {} -cleanup { # } -result "" # Cleanup ::tcltest::cleanupTests } namespace delete ::resource::test |