From: Matt S Trout Date: Sun, 5 Aug 2012 17:44:54 +0000 (+0000) Subject: more future API X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=15e006dc2024516bb80569d6b97c3b895eb9b46a;p=scpubgit%2FTenDotTcl.git more future API --- diff --git a/t/future.t b/t/future.t new file mode 100644 index 0000000..ef9ae98 --- /dev/null +++ b/t/future.t @@ -0,0 +1,20 @@ +BEGIN { exec(tclsh => 't/tcl/harness.tcl' => $0) } + +package require ten + +ten::future f1 + +ok {![f1 is_ready]} "Future not yet ready" + +set ready_args "" +set done_args "" + +f1 on_ready {set "[namespace current]::ready_args"} + +f1 on_done {set "[namespace current]::done_args"} + +f1 done foo bar + +ok {[f1 is_ready]} "Future ready" + +done_testing