[Tclresource-commits] Extras/Tests CloseCmd.test,NONE,1.1
Status: Beta
Brought to you by:
bdesgraupes
From: Bernard D. <bde...@us...> - 2004-09-06 07:01:17
|
Update of /cvsroot/tclresource/Extras/Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29163/Extras/Tests Added Files: CloseCmd.test Log Message: First checkin --- NEW FILE: CloseCmd.test --- # ------------------------------------------------------- # File: "CloseCmd.test" # Created: 2004-09-05 20:16:33 # Last modification: 2004-09-05 10:49:55 # 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 close] command defined # in the Tclresource extension. # # $Date: 2004/09/06 07:01:06 $ # $Revision: 1.1 $ # ------------------------------------------------------- source [file join [file dir [info script]] common.tcl] namespace eval ::resource::test { namespace import ::tcltest::* test ResourceClose-1-1 {Close a fork previously opened} -setup { } -body { set rid [resource open $resfileDF] resource close $rid } -cleanup { } -result "" test ResourceClose-1-2 {Closing self is forbidden} -setup { } -body { catch {resource close application} res set res } -cleanup { } -result "not allowed to close \"application\" resource file" test ResourceClose-1-3 {Close a non existing fork is an error} -setup { } -body { catch {resource close resource0} res set res } -cleanup { } -match glob -result "invalid resource file reference*" # Cleanup ::tcltest::cleanupTests } namespace delete ::resource::test |