aboutsummaryrefslogtreecommitdiff
path: root/tests/testing.tcl
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2010-01-24 13:49:27 +1000
committerSteve Bennett <steveb@workware.net.au>2010-10-15 11:02:45 +1000
commit771262b3fa50a46fa80d8a8fa011f355f1ce0913 (patch)
treef5fccb44226f87c7fc895c3c027f7e2d83831023 /tests/testing.tcl
parentee6dbe0a8d66f8f17a5da82e8dad810d88e33bf6 (diff)
downloadjimtcl-771262b3fa50a46fa80d8a8fa011f355f1ce0913.zip
jimtcl-771262b3fa50a46fa80d8a8fa011f355f1ce0913.tar.gz
jimtcl-771262b3fa50a46fa80d8a8fa011f355f1ce0913.tar.bz2
Implement TIP #288
See http://www.tcl.tk/cgi-bin/tct/tip/288.html Args and optional args may be to the left of required args
Diffstat (limited to 'tests/testing.tcl')
-rw-r--r--tests/testing.tcl13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/testing.tcl b/tests/testing.tcl
index 221d6be..a675c5e 100644
--- a/tests/testing.tcl
+++ b/tests/testing.tcl
@@ -38,13 +38,20 @@ set testresults(numpass) 0
set testresults(failed) {}
proc test {id descr script expected} {
- puts -nonewline "$id "
+ if {!$::testquiet} {
+ puts -nonewline "$id "
+ }
set rc [catch {uplevel 1 $script} result]
# Note that rc=2 is return
if {($rc == 0 || $rc == 2) && $result eq $expected} {
- puts "OK $descr"
+ if {!$::testquiet} {
+ puts "OK $descr"
+ }
incr ::testresults(numpass)
} else {
+ if {$::testquiet} {
+ puts -nonewline "$id "
+ }
puts "ERR $descr"
puts "Expected: '$expected'"
puts "Got : '$result'"
@@ -71,3 +78,5 @@ proc testerror {} {
puts [string repeat = 40]
puts $argv0
puts [string repeat = 40]
+
+set ::testquiet [info exists ::env(testquiet)]