[Tclresource-commits] Extras/Tests NameCmd.test,NONE,1.1
Status: Beta
Brought to you by:
bdesgraupes
From: Bernard D. <bde...@us...> - 2004-09-06 07:03:47
|
Update of /cvsroot/tclresource/Extras/Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29618/Extras/Tests Added Files: NameCmd.test Log Message: First checkin --- NEW FILE: NameCmd.test --- # ------------------------------------------------------- # File: "NameCmd.test" # Created: 2004-09-05 20:16:33 # Last modification: 2004-09-06 07:57:51 # 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 name] command defined # in the Tclresource extension. # # $Date: 2004/09/06 07:03:30 $ # $Revision: 1.1 $ # ------------------------------------------------------- source [file join [file dir [info script]] common.tcl] namespace eval ::resource::test { namespace import ::tcltest::* test ResourceName-1-1 {Get name from ID} -setup { set rid [resource open $resfileDF] } -body { set res [resource name TEXT 128 $rid] } -cleanup { resource close $rid } -result "Say hello" test ResourceName-1-2 {Resource with no name} -setup { set rid [resource open $resfileDF] } -body { set res [resource name ALRT 128 $rid] } -cleanup { resource close $rid } -result "" test ResourceName-1-3 {Non existing resource} -setup { set rid [resource open $resfileDF] } -body { set res [resource name TEXT 1000 $rid] } -cleanup { resource close $rid } -returnCodes error -result "could not find resource" # Cleanup ::tcltest::cleanupTests } namespace delete ::resource::test |