1 BEGIN { exec(tclsh => 't/tcl/harness.tcl' => $0) }
4 package require json::write
6 if {[array names ::env PERL5LIB]==""} {
7 array set ::env [list PERL5LIB t/lib]
9 array set ::env [list PERL5LIB "t/lib:$::env(PERL5LIB)"]
12 set connector [ten::connector::perl %AUTO%]
14 set conn [$connector connect]
19 lappend ret [ json::write string $str ]
25 $conn send call {*}[jws class_call_handler 0 call Sys::Hostname hostname]
30 $f1 on_ready [list apply {{name future} {set $name [$future get]}} "[namespace current]::ready_args" ]
32 set my_host [exec hostname]
34 is [$f1 await_get] $my_host "hostname returned ok via get"
36 is $ready_args $my_host "hostname returned ok via on_ready"
38 set ortestdata [[$conn send call {*}[jws class_call_handler 0 call ORTestClass new]] await_get]
40 set ortestoid [lindex $ortestdata 0 1]
42 set ortest [$conn remote_object $ortestoid]
44 cmp_ok != [pid] [$ortest call pid] "pid is different on the other side"
46 is [$ortest call counter] 0 "Counter at 0"
48 is [$ortest call increment] 1 "Incrememt to 1"
50 is [$ortest call counter] 1 "Counter at 1"