diff options
Diffstat (limited to 'tests/testing.tcl')
-rw-r--r-- | tests/testing.tcl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/testing.tcl b/tests/testing.tcl index 30aecee..8bfd22d 100644 --- a/tests/testing.tcl +++ b/tests/testing.tcl @@ -74,6 +74,7 @@ lappend auto_path $testdir $bindir [file dirname [pwd]] # For Jim, this is reasonable compatible tcltest proc makeFile {contents name} { set f [open $name w] + stdout puts "About to 'puts $f $contents'" puts $f $contents close $f return $name @@ -83,6 +84,23 @@ proc removeFile {name} { file delete $name } +# In case tclcompat is not selected +if {![exists -proc puts]} { + proc puts {{-nonewline {}} {chan stdout} msg} { + if {${-nonewline} ni {-nonewline {}}} { + ${-nonewline} puts $msg + } else { + $chan puts {*}${-nonewline} $msg + } + } + proc close {chan args} { + $chan close {*}$args + } + proc fileevent {args} { + {*}$args + } +} + proc script_source {script} { lassign [info source $script] f l if {$f ne ""} { |