Update of /cvsroot/tclresource/Extras/Tests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2995
Modified Files:
ListCmd.test TypesCmd.test common.tcl
Log Message:
New tests
Index: TypesCmd.test
===================================================================
RCS file: /cvsroot/tclresource/Extras/Tests/TypesCmd.test,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- TypesCmd.test 6 Sep 2004 07:04:08 -0000 1.1
+++ TypesCmd.test 6 Sep 2004 10:44:07 -0000 1.2
@@ -40,6 +40,8 @@
test ResourceTypes-1-3 {Getting all types for all resources} -setup {
} -body {
+ # Just check that it does not fail. We can't know in advance the
+ # complete list of types.
catch {resource types}
} -cleanup {
} -result 0
Index: ListCmd.test
===================================================================
RCS file: /cvsroot/tclresource/Extras/Tests/ListCmd.test,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ListCmd.test 6 Sep 2004 07:03:07 -0000 1.1
+++ ListCmd.test 6 Sep 2004 10:44:07 -0000 1.2
@@ -1,7 +1,7 @@
# -------------------------------------------------------
# File: "ListCmd.test"
# Created: 2004-09-05 20:16:33
-# Last modification: 2004-09-05 10:49:55
+# Last modification: 2004-09-06 12:35:50
# Author: Bernard Desgraupes
# e-mail: <bde...@ea...>
# www: <http://webperso.easyconnect.fr/bdesgraupes/>
@@ -22,23 +22,32 @@
namespace eval ::resource::test {
namespace import ::tcltest::*
- test ResourceList-1-1 {} -setup {
+ test ResourceList-1-1 {Get a list} -setup {
+ set rid [resource open $resfileDF]
} -body {
+ set res [resource list TEXT $rid]
} -cleanup {
- } -result ""
+ resource close $rid
+ } -result [list "Say hello" "Say goodbye"]
- test ResourceList-1-2 {} -setup {
+ test ResourceList-1-2 {Using the -ids option} -setup {
+ set rid [resource open $resfileDF]
} -body {
+ set res [resource list -ids TEXT $rid]
} -cleanup {
- } -result ""
+ resource close $rid
+ } -result [list 128 129]
- test ResourceList-1-3 {} -setup {
+ test ResourceList-1-3 {Non existing type} -setup {
+ set rid [resource open $resfileDF]
} -body {
+ set res [resource list wxyz $rid]
} -cleanup {
+ resource close $rid
} -result ""
-# Cleanup
-::tcltest::cleanupTests
+ # Cleanup
+ ::tcltest::cleanupTests
}
namespace delete ::resource::test
Index: common.tcl
===================================================================
RCS file: /cvsroot/tclresource/Extras/Tests/common.tcl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- common.tcl 6 Sep 2004 07:01:15 -0000 1.1
+++ common.tcl 6 Sep 2004 10:44:07 -0000 1.2
@@ -40,4 +40,3 @@
package require resource 1.1
-# set resfileDF "/Volumes/hd3/Tcl/Tcl_Sources/Extensions/Tclresource/Tclresource/Extras/Tests/TestResourcesDF.rsrc"
\ No newline at end of file
|