aboutsummaryrefslogtreecommitdiff
path: root/tcltests
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2009-07-28 23:27:07 +1000
committerSteve Bennett <steveb@workware.net.au>2010-10-15 10:11:02 +1000
commit6d4a1fed22fa67739a2b51d9ee9f343cbd70f300 (patch)
tree0779f449d9eb3a4a1a625cc3529f9bc34127556f /tcltests
parent190223fa72351ee07c5006b46eee3a9194605cda (diff)
downloadjimtcl-6d4a1fed22fa67739a2b51d9ee9f343cbd70f300.zip
jimtcl-6d4a1fed22fa67739a2b51d9ee9f343cbd70f300.tar.gz
jimtcl-6d4a1fed22fa67739a2b51d9ee9f343cbd70f300.tar.bz2
Convert jim-aio.c to use subcmd
Also: - make stream.server set SO_REUSEADDR - do object reference properly for callbacks - white space cleanup in jim-eventloop.c - fix the pwd command - add support for JIM_MODFLAG_FULLARGV to subcmd - make verbose runtests easier to read - bio might not be available
Diffstat (limited to 'tcltests')
-rwxr-xr-xtcltests/runtests21
-rw-r--r--tcltests/test_bio.tcl4
-rw-r--r--tcltests/test_read.tcl5
3 files changed, 25 insertions, 5 deletions
diff --git a/tcltests/runtests b/tcltests/runtests
index df0faba..e3ce73b 100755
--- a/tcltests/runtests
+++ b/tcltests/runtests
@@ -19,14 +19,27 @@ proc verbose {msg} {
set verbose [string equal [lindex $argv 0] "-v"]
foreach i [glob test_*.tcl] {
- puts -nonewline "$i..."
- flush stdout
- if {[catch {source $i} error]} {
+ if {$verbose} {
+ puts "======= $i ======="
+ } else {
+ puts -nonewline "$i..."
+ flush stdout
+ }
+ set rc [catch {source $i} result]
+ if {$verbose} {
+ puts -nonewline "$i..."
+ }
+ if {$rc} {
puts "failed"
if {$verbose} {
- puts $error
+ puts $result
}
+ } elseif {$result ne ""} {
+ puts $result
} else {
puts "ok"
}
+ if {$verbose} {
+ puts ""
+ }
}
diff --git a/tcltests/test_bio.tcl b/tcltests/test_bio.tcl
index addcbeb..16a40ae 100644
--- a/tcltests/test_bio.tcl
+++ b/tcltests/test_bio.tcl
@@ -1,3 +1,7 @@
+if {[info commands bio] eq ""} {
+ return "noimpl"
+}
+
proc copy_binary_file {infile outfile} {
set in [open $infile r]
set out [open $outfile w]
diff --git a/tcltests/test_read.tcl b/tcltests/test_read.tcl
index a142128..f7d4c29 100644
--- a/tcltests/test_read.tcl
+++ b/tcltests/test_read.tcl
@@ -7,7 +7,8 @@ signal handle SIGALRM
catch -signal {
alarm 0.5
while {1} {
- incr count [bio read -hex $f buf 1]
+ incr count [string length [read $f 100]]
+ #incr count [bio read -hex $f buf 1]
}
alarm 0
signal default SIGALRM
@@ -18,3 +19,5 @@ verbose "Read $count bytes in 0.5 seconds: Got $error"
# Kill it off
#kill -TERM [pid $f]
catch {close $f}
+
+return