X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fconnection.t;fp=t%2Fconnection.t;h=41e0e2cadc8af4a07e2869f166184e2b601ddfea;hb=61761da290253891bc6e4d46d8b619b5e39ea038;hp=92b9317db55b5a896c9f72ab86f62a38e29da291;hpb=9540dca14bd5b1d4edd1889ead07c2fa4d92af6c;p=scpubgit%2FTenDotTcl.git diff --git a/t/connection.t b/t/connection.t index 92b9317..41e0e2c 100644 --- a/t/connection.t +++ b/t/connection.t @@ -7,10 +7,16 @@ set connector [ten::connector::perl %AUTO%] set conn [$connector connect] +proc jws {args} { + set ret {} + foreach str $args { + lappend ret [ json::write string $str ] + } + return $ret +} + set f1 [ - $conn send call [ json::write string class_call_handler ] \ - 0 [ json::write string call ] \ - [ json::write string Sys::Hostname ] [ json::write string hostname ] + $conn send call {*}[jws class_call_handler 0 call Sys::Hostname hostname] ] set ready_args "" @@ -28,3 +34,5 @@ is [$f1 get] $my_host "hostname retuend ok via get" $f1 free is $ready_args $my_host "hostname returned ok via on_ready" + +done_testing