summaryrefslogtreecommitdiff
path: root/tests/misc.test
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2010-10-30 15:21:21 +1000
committerSteve Bennett <steveb@workware.net.au>2010-11-22 13:27:14 +1000
commit192056900583884bc1f07f371df6478d856ada3b (patch)
tree540618a3e81d8d9e14261e267edb912f5b73710a /tests/misc.test
parentd98489727fe31fa217d237b36901211adc35282d (diff)
Overhaul unit test framework
Much closer to tcltest now, including constraints. Try to get all appropriate tests running under both Jim and Tcl. Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests/misc.test')
-rw-r--r--tests/misc.test14
1 files changed, 4 insertions, 10 deletions
diff --git a/tests/misc.test b/tests/misc.test
index 0dc1112..ad9dd35 100644
--- a/tests/misc.test
+++ b/tests/misc.test
@@ -1,6 +1,6 @@
-source testing.tcl
+source [file dirname [info script]]/testing.tcl
-section "Regression Testing"
+needs constraint jim
catch {unset a b}
test regr-1.1 "Double dereference arrays" {
@@ -20,7 +20,7 @@ test regr-1.2 "Reference count shared literals" {
return 1
} {1}
-test regr-1.3 "Invalid for expression" {
+test regr-1.3 "Invalid for expression" jim {
# Crashes with invalid expression
catch {
for {set i 0} {$i < n} {incr i} {
@@ -41,11 +41,9 @@ test regr-1.5 "lassign with empty list" {
info exists c
} {1}
-section "I/O Testing"
-
test io-1.1 "Read last line with no newline" {
set lines 0
- set f [open testio.in]
+ set f [open $testdir/testio.in]
while {[gets $f buf] >= 0} {
incr lines
}
@@ -53,8 +51,6 @@ test io-1.1 "Read last line with no newline" {
list $lines
} {2}
-section "unset"
-
set g1 1
set g2 2
array set g3 {4 5 6 7}
@@ -111,8 +107,6 @@ proc test_unset {} {
test_unset
-section "lrepeat"
-
test lrepeat-1.1 "Basic tests" {
lrepeat 1 a
} {a}