aboutsummaryrefslogtreecommitdiff
path: root/tests/testing.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testing.tcl')
-rw-r--r--tests/testing.tcl16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/testing.tcl b/tests/testing.tcl
index 137e9ae..aca89b2 100644
--- a/tests/testing.tcl
+++ b/tests/testing.tcl
@@ -4,6 +4,14 @@ proc makeFile {contents name} {
close $f
}
+proc script_source {script} {
+ lassign [info source $script] f l
+ if {$f ne ""} {
+ puts "At : $f:$l"
+ return \t$f:$l
+ }
+}
+
proc error_source {} {
lassign [info stacktrace] p f l
if {$f ne ""} {
@@ -20,6 +28,8 @@ catch {
}
proc error_source {} {
}
+ proc script_source {script} {
+ }
}
proc section {name} {
@@ -50,7 +60,11 @@ proc test {id descr script expected} {
puts -nonewline "$id "
}
puts "ERR $descr"
- set source [error_source]
+ if {$rc == 0} {
+ set source [script_source $script]
+ } else {
+ set source [error_source]
+ }
puts "Expected: '$expected'"
puts "Got : '$result'"
incr ::test(numfail)