diff options
| author | 2021-06-27 12:43:30 -0500 | |
|---|---|---|
| committer | 2021-06-27 12:43:30 -0500 | |
| commit | f3857804d5c88ccf794614f562c2f98129a1e48b (patch) | |
| tree | 9f5500006a5e48fc5ddc79ae3004f27d51e21ff2 /test | |
| parent | Merge branch 'master' of github.com:janet-lang/spork (diff) | |
Fix typo and add ev-utils.
Diffstat (limited to 'test')
| -rw-r--r-- | test/suite10.janet | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/suite10.janet b/test/suite10.janet new file mode 100644 index 0000000..05e58d9 --- /dev/null +++ b/test/suite10.janet @@ -0,0 +1,15 @@ +(use ../spork/test) +(import ../spork/ev-utils :as eu) + +(start-suite 10) + +(var x 0) +(eu/pcall (fn workerf [&] (++ x)) 10) +(assert (= x 10) "pcall 1") +(set x 0) +(eu/pcall (fn workerf [i] (+= x i)) 10) +(assert (= x 45) "pcall 2") + + + +(end-suite) |
