Not logged in
Artifact [ca5378fd0f]

Artifact ca5378fd0ff27427a12c5832fa5e218c22bae397:

  • File test/th1-tcl1.txt — part of check-in [d87454917c] at 2011-11-04 23:34:11 on branch jimtcl — Cleanup style and use Jim_Obj APIs when bridging commands from Tcl to Jim. (user: mistachkin size: 887)

<th1>
  #
  # This is a "script fragment" used to test the Tcl integration features of
  # Fossil.  The corresponding test file executes this file using the
  # test-script-render Fossil command.
  #
  set channel stdout; tclInvoke set channel $channel
  proc doOut {msg} {puts $msg; puts \n}
  doOut [tclEval clock seconds]
  doOut [tclEval {set x [clock seconds]}]
  tclEval {puts $channel "[clock seconds]"}
  tclInvoke puts $channel "via Tcl invoke"
  doOut [tclExpr 2+2]
  doOut [tclExpr 2 + 2]
  doOut [tclInvoke set x "two words"]
  doOut [tclInvoke eval set y one_word]
  doOut [tclInvoke eval {set z "three words now"}]
  doOut [set x [tclEval {set x [clock seconds]}]]
  doOut [tclInvoke bridgeEval {set y "two words"}]
  doOut [set z [tclInvoke bridgeExpr {2+2}]]
  doOut $x
  doOut $y
  doOut $z
  doOut [tclEval set x]
  doOut [tclEval set y]
  doOut [tclEval set z]
</th1>