aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorCalvin Rose <calsrose@gmail.com>2021-06-27 12:43:30 -0500
committerCalvin Rose <calsrose@gmail.com>2021-06-27 12:43:30 -0500
commitf3857804d5c88ccf794614f562c2f98129a1e48b (patch)
tree9f5500006a5e48fc5ddc79ae3004f27d51e21ff2 /test
parentMerge branch 'master' of github.com:janet-lang/spork (diff)
Fix typo and add ev-utils.
Diffstat (limited to 'test')
-rw-r--r--test/suite10.janet15
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)