working hostname call
[scpubgit/TenDotTcl.git] / t / connection.t
CommitLineData
0e93bc12 1BEGIN { exec(tclsh => 't/tcl/harness.tcl' => $0) }
2
3package require ten
4package require json::write
5
6set connector [ten::connector::perl %AUTO%]
7
8set conn [$connector connect]
9
10set f1 [
11 $conn send call [ json::write string class_call_handler ] \
12 0 [ json::write string call ] \
13 [ json::write string Sys::Hostname ] [ json::write string hostname ]
14]
15
16set ready_args ""
17
18$f1 on_ready [list apply {{name future} {set $name [$future get]}} "[namespace current]::ready_args" ]
19
20$f1 await_ready
21
22is $ready_args [exec hostname] "hostname returned ok"