summaryrefslogtreecommitdiffstats
path: root/tests/tcltests.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tcltests.tcl')
-rw-r--r--tests/tcltests.tcl12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/tcltests.tcl b/tests/tcltests.tcl
index a2251bf..61366a4 100644
--- a/tests/tcltests.tcl
+++ b/tests/tcltests.tcl
@@ -34,6 +34,18 @@ namespace eval ::tcltests {
}
+ # Stolen from dict.test
+ proc scriptmemcheck script {
+ set end [lindex [split [memory info] \n] 3 3]
+ for {set i 0} {$i < 5} {incr i} {
+ uplevel 1 $script
+ set tmp $end
+ set end [lindex [split [memory info] \n] 3 3]
+ }
+ expr {$end - $tmp}
+ }
+
+
proc tempdir_alternate {} {
close [file tempfile tempfile]
set tmpdir [file dirname $tempfile]