diff options
| -rw-r--r-- | spec/inputs/backcall.moon | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/spec/inputs/backcall.moon b/spec/inputs/backcall.moon index c52fee3..a65bb0a 100644 --- a/spec/inputs/backcall.moon +++ b/spec/inputs/backcall.moon | |||
| @@ -31,6 +31,10 @@ f = -> | |||
| 31 | 998 |> func0("abc", 233) |> func1 |> func2 | 31 | 998 |> func0("abc", 233) |> func1 |> func2 |
| 32 | 32 | ||
| 33 | do | 33 | do |
| 34 | (x)<-map {1,2,3} | ||
| 35 | x * 2 | ||
| 36 | |||
| 37 | do | ||
| 34 | (data)<- http?.get "ajaxtest" | 38 | (data)<- http?.get "ajaxtest" |
| 35 | body[".result"]\html data | 39 | body[".result"]\html data |
| 36 | (processed)<- http.post "ajaxprocess", data | 40 | (processed)<- http.post "ajaxprocess", data |
| @@ -44,7 +48,7 @@ do | |||
| 44 | if err | 48 | if err |
| 45 | print err | 49 | print err |
| 46 | return | 50 | return |
| 47 | (codes) <- compileAsync data | 51 | (codes)<- compileAsync data |
| 48 | func = loadstring codes | 52 | func = loadstring codes |
| 49 | func! | 53 | func! |
| 50 | 54 | ||
| @@ -59,13 +63,15 @@ do | |||
| 59 | f7! | 63 | f7! |
| 60 | 64 | ||
| 61 | do | 65 | do |
| 62 | result = do | 66 | {:result,:msg} = do |
| 63 | (data)<- loadAsync "filename.txt" | 67 | (data)<- receiveAsync "filename.txt" |
| 64 | print data | 68 | print data |
| 65 | print result | 69 | (info)<- processAsync data |
| 70 | check info | ||
| 71 | print result,msg | ||
| 66 | 72 | ||
| 67 | totalSize = (for file in *files | 73 | totalSize = (for file in *files |
| 68 | (data)<-loadAsync file | 74 | (data)<- loadAsync file |
| 69 | addToCache file,data) |> reduce 0,(a,b)-> a+b | 75 | addToCache file,data) |> reduce 0,(a,b)-> a+b |
| 70 | 76 | ||
| 71 | alert "hi" | 77 | alert "hi" |
