Posted to tcl by miguel at Mon Oct 30 23:24:41 GMT 2006view raw

  1. package require tcltest
  2. namespace import tcltest::*
  3. lappend auto_path .
  4.  
  5. source ../devtools/testutilities.tcl
  6.  
  7. testsNeedTcl 8.3
  8. testsNeedTcltest 1.0
  9.  
  10. testing {
  11. useLocal profiler.tcl profiler
  12. }
  13.  
  14. ::tcltest::testConstraint tcl8.4only [expr {![package vsatisfies [package provide Tcl] 8.5]}]
  15.  
  16. set c [interp create]
  17. interp alias $c parentSet {} set
  18.  
  19. $c eval {set auto_path [parentSet auto_path]}
  20. $c eval {package require profiler}
  21. $c eval { profiler::init}
  22. $c eval {
  23. proc ::foo {} {
  24. ::bar
  25. }
  26. }
  27. $c eval {
  28. proc ::bar {} {
  29. after 300
  30. }
  31. }
  32. $c eval foo