aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2010-09-28 07:53:32 +1000
committerSteve Bennett <steveb@workware.net.au>2010-10-15 11:02:55 +1000
commitae5a40b0d0709114b2a18f90855c03df1d7100cb (patch)
tree278c386a03c5476a14ba1fb691d2c92125133984 /tests
parent417e0043f7612593d839d415039ee54c2603d28a (diff)
downloadjimtcl-ae5a40b0d0709114b2a18f90855c03df1d7100cb.zip
jimtcl-ae5a40b0d0709114b2a18f90855c03df1d7100cb.tar.gz
jimtcl-ae5a40b0d0709114b2a18f90855c03df1d7100cb.tar.bz2
Skip tests for features which are not available
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests')
-rw-r--r--tests/case.test1
-rw-r--r--tests/event.test1
-rw-r--r--tests/exec.test1
-rw-r--r--tests/exec2.test1
-rw-r--r--tests/filecopy.test2
-rw-r--r--tests/filedir.test2
-rw-r--r--tests/filejoin.test1
-rw-r--r--tests/jim.test20
-rw-r--r--tests/misc.test1
-rw-r--r--tests/regexp.test1
-rw-r--r--tests/testing.tcl9
-rw-r--r--tests/timer.test1
-rw-r--r--tests/tree.test2
13 files changed, 32 insertions, 11 deletions
diff --git a/tests/case.test b/tests/case.test
index a774004..74f7405 100644
--- a/tests/case.test
+++ b/tests/case.test
@@ -1,5 +1,6 @@
source testing.tcl
+catch {unset result}
test case-1.1 "Simple case" {
foreach c {abc xyz def sdfbc basdf a aba} {
case $c in {
diff --git a/tests/event.test b/tests/event.test
index 189bb1e..0f681af 100644
--- a/tests/event.test
+++ b/tests/event.test
@@ -10,6 +10,7 @@
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
source testing.tcl
+package-or-skip eventloop
test event-5.1 {Tcl_BackgroundError, HandleBgErrors procedures} {
catch {rename bgerror {}}
diff --git a/tests/exec.test b/tests/exec.test
index e1b6e36..a43f065 100644
--- a/tests/exec.test
+++ b/tests/exec.test
@@ -14,6 +14,7 @@
# RCS: @(#) $Id: exec.test,v 1.8.2.1 2001/10/17 19:29:25 das Exp $
source testing.tcl
+package-or-skip exec
set f [open echo w]
puts $f {
diff --git a/tests/exec2.test b/tests/exec2.test
index e3d8a25..fcf572f 100644
--- a/tests/exec2.test
+++ b/tests/exec2.test
@@ -3,6 +3,7 @@
# in quoting arguments to exec.
source testing.tcl
+package-or-skip exec
set d \"
set s '
diff --git a/tests/filecopy.test b/tests/filecopy.test
index b7c4f47..7dab00f 100644
--- a/tests/filecopy.test
+++ b/tests/filecopy.test
@@ -1,4 +1,6 @@
source testing.tcl
+package-or-skip file
+package-or-skip bio
file mkdir tempdir
diff --git a/tests/filedir.test b/tests/filedir.test
index cb1f3a7..95dbd0c 100644
--- a/tests/filedir.test
+++ b/tests/filedir.test
@@ -1,4 +1,6 @@
source testing.tcl
+package-or-skip file
+package-or-skip exec
catch {
exec rm -rf tmp
diff --git a/tests/filejoin.test b/tests/filejoin.test
index 56fe661..c6d2572 100644
--- a/tests/filejoin.test
+++ b/tests/filejoin.test
@@ -1,4 +1,5 @@
source testing.tcl
+package-or-skip file
test join-1.1 "One name" {
file join abc
diff --git a/tests/jim.test b/tests/jim.test
index 691b21f..416470d 100644
--- a/tests/jim.test
+++ b/tests/jim.test
@@ -3095,17 +3095,17 @@ test info-2.2 {info commands option} {
string match {* t1 *} $x
} 0
test info-2.3 {info commands option} {
- proc _t1_ {} {}
- proc _t2_ {} {}
- info commands _t1_
-} _t1_
+ proc _test1_ {} {}
+ proc _test2_ {} {}
+ info commands _test1_
+} _test1_
test info-2.4 {info commands option} {
- proc _t1_ {} {}
- proc _t2_ {} {}
- lsort [info commands _t*]
-} {_t1_ _t2_}
-catch {rename _t1_ {}}
-catch {rename _t2_ {}}
+ proc _test1_ {} {}
+ proc _test2_ {} {}
+ lsort [info commands _test*]
+} {_test1_ _test2_}
+catch {rename _test1_ {}}
+catch {rename _test2_ {}}
test info-2.5 {info commands option} {
list [catch {info commands a b} msg] $msg
} {1 {wrong # args: should be "info commands ?pattern?"}}
diff --git a/tests/misc.test b/tests/misc.test
index cbaaa5a..21e79f3 100644
--- a/tests/misc.test
+++ b/tests/misc.test
@@ -2,6 +2,7 @@ source testing.tcl
section "Regression Testing"
+catch {unset a b}
test regr-1.1 "Double dereference arrays" {
array set a {one ONE two TWO three THREE}
array set b {ONE 1 TWO 2 THREE 3}
diff --git a/tests/regexp.test b/tests/regexp.test
index 41d0620..df8189f 100644
--- a/tests/regexp.test
+++ b/tests/regexp.test
@@ -1,4 +1,5 @@
source testing.tcl
+package-or-skip regexp
test regexp-1.1 {effect of caching} {
diff --git a/tests/testing.tcl b/tests/testing.tcl
index aca89b2..1fde188 100644
--- a/tests/testing.tcl
+++ b/tests/testing.tcl
@@ -20,6 +20,15 @@ proc error_source {} {
}
}
+proc package-or-skip {name} {
+ if {[catch {
+ package require $name
+ }]} {
+ puts " --- skipped"
+ exit 0
+ }
+}
+
catch {
# Tcl-only things
info tclversion
diff --git a/tests/timer.test b/tests/timer.test
index d1c7e1f..1cbfc35 100644
--- a/tests/timer.test
+++ b/tests/timer.test
@@ -16,6 +16,7 @@
# RCS: @(#) $Id: timer.test,v 1.7.2.1 2001/10/13 01:14:19 hobbs Exp $
source testing.tcl
+package-or-skip eventloop
test timer-1.1 {Tcl_CreateTimerHandler procedure} {
foreach i [after info] {
diff --git a/tests/tree.test b/tests/tree.test
index e744708..cd22916 100644
--- a/tests/tree.test
+++ b/tests/tree.test
@@ -1,5 +1,5 @@
package require testing
-package require tree
+package-or-skip tree
section "tree"