Posted to tcl by de at Wed Jun 24 13:02:44 GMT 2009view raw

  1. ==== tailcall-1 tailcall FAILED
  2. ==== Contents of test case:
  3.  
  4. namespace eval a {
  5. variable x *::a
  6. proc xset {} {
  7. set tmp {}
  8. set ns {[namespace current]}
  9. set level [info level]
  10. for {set i 0} {$i <= [info level]} {incr i} {
  11. uplevel #$i "set x $i$ns"
  12. lappend tmp "$i [info level $i]"
  13. }
  14. lrange $tmp 1 end
  15. }
  16. proc foo {} {tailcall xset; set x noreach}
  17. }
  18. namespace eval b {
  19. variable x *::b
  20. proc xset args {error b::xset}
  21. proc moo {} {set x 0; variable y [::a::foo]; set x}
  22. }
  23. variable x *::
  24. proc xset args {error ::xset}
  25. list [::b::moo] | $x $a::x $b::x | $::b::y
  26.  
  27. ---- Test generated error; Return code was: 1
  28. ---- Return code should have been one of: 0 2
  29. ---- errorInfo: invalid command name "foo"
  30. while executing
  31. "foo x {} write"
  32. (write trace on "x")
  33. invoked from within
  34. "variable x *::"
  35. ("uplevel" body line 21)
  36. invoked from within
  37. "uplevel 1 $script"
  38. ---- errorCode: TCL WRITE VARNAME
  39. ---- Test cleanup failed:
  40. can't delete "xset": command doesn't exist
  41. ---- errorInfo(cleanup): can't delete "xset": command doesn't exist
  42. while executing
  43. "rename xset {}"
  44. ("uplevel" body line 3)
  45. invoked from within
  46. "uplevel 1 $cleanup"
  47. ---- errorCode(cleanup): NONE
  48. ==== tailcall-1 FAILED
  49.  
  50.