diff options
author | Steve Bennett <steveb@workware.net.au> | 2009-07-28 15:53:00 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2010-10-15 10:11:02 +1000 |
commit | c44ee8b464189b01cd28a7609e7f21777a73644c (patch) | |
tree | 19ee42b183277e046b6a720172e9bcc2ce99e5da /tcltests/runtests | |
parent | 1692f3e4c3f8460446e8a21bc7c06b150c3c6aaa (diff) | |
download | jimtcl-c44ee8b464189b01cd28a7609e7f21777a73644c.zip jimtcl-c44ee8b464189b01cd28a7609e7f21777a73644c.tar.gz jimtcl-c44ee8b464189b01cd28a7609e7f21777a73644c.tar.bz2 |
Add some tests from tinytcl
Diffstat (limited to 'tcltests/runtests')
-rwxr-xr-x | tcltests/runtests | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tcltests/runtests b/tcltests/runtests new file mode 100755 index 0000000..df0faba --- /dev/null +++ b/tcltests/runtests @@ -0,0 +1,32 @@ +#!/bin/sh + +# \ +exec ../tclsh $0 + +#package require tcl6 + +proc check {test got exp} { + if {$got != $exp} { + error "Failed: $test\nExp: {$exp}\nGot: {$got}" + } +} +proc verbose {msg} { + if {$::verbose} { + puts $msg + } +} + +set verbose [string equal [lindex $argv 0] "-v"] + +foreach i [glob test_*.tcl] { + puts -nonewline "$i..." + flush stdout + if {[catch {source $i} error]} { + puts "failed" + if {$verbose} { + puts $error + } + } else { + puts "ok" + } +} |