set ready_args ""
set done_args ""
-f1 on_ready {set "[namespace current]::ready_args"}
+f1 on_ready [list set "[namespace current]::ready_args"]
-f1 on_done {set "[namespace current]::done_args"}
+f1 on_done [list set "[namespace current]::done_args"]
f1 done foo bar
ok {[f1 is_ready]} "Future ready"
+is $ready_args {::f1} "Future passed to ready"
+
+cmp_ok == [llength $done_args] 2 "Both args passed to done"
+
+is [lindex $done_args 0] foo "Right first arg"
+
+is [lindex $done_args 1] bar "Right second arg"
+
+is [f1 get] "foo bar" "get return ok"
+
done_testing