[Tclresource-commits] Extras/Tests WriteCmd.test,1.2,1.3
Status: Beta
Brought to you by:
bdesgraupes
From: Bernard D. <bde...@us...> - 2004-09-06 22:17:22
|
Update of /cvsroot/tclresource/Extras/Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv440 Modified Files: WriteCmd.test Log Message: Added test with resProtected flag Index: WriteCmd.test =================================================================== RCS file: /cvsroot/tclresource/Extras/Tests/WriteCmd.test,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- WriteCmd.test 6 Sep 2004 16:56:37 -0000 1.2 +++ WriteCmd.test 6 Sep 2004 22:17:10 -0000 1.3 @@ -1,7 +1,7 @@ # ------------------------------------------------------- # File: "WriteCmd.test" # Created: 2004-09-05 20:16:33 -# Last modification: 2004-09-06 18:52:16 +# Last modification: 2004-09-07 00:15:04 # Author: Bernard Desgraupes # e-mail: <bde...@ea...> # www: <http://webperso.easyconnect.fr/bdesgraupes/> @@ -90,10 +90,14 @@ resource write -id 1000 -file $rid ALRT "\x00\x28\x00\x28\x00\x87\x01\x7c\x00\x80\x55\x55\x30\x0a" } -cleanup $CLEANUP -result "" -# test ResourceWrite-1-10 {} -setup { -# } -body { -# } -cleanup { -# } -result "" + test ResourceWrite-1-10 {Try to write a resProtected resource} -setup $SETUP -body { + resource write -id 1000 -file $rid TEXT "Hello Tclresource!" + # resProtected = 8 + resource attributes $rid -id 1000 TEXT 8 + # Try to force write over the resource + resource write -id 1000 -file $rid -force TEXT "Goodbye Tclresource!" + } -cleanup $CLEANUP -returnCodes error -match glob \ + -result "could not write resource id 1000 of type TEXT, it was protected." # Cleanup ::tcltest::cleanupTests |