aboutsummaryrefslogtreecommitdiff
path: root/tests/coroutines.nom
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-07-18 01:27:56 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-07-18 01:28:17 -0700
commitd5cfaa37be9e278c44a25ef448a071390597306e (patch)
tree7fbe78b5153bb9c761c283533943ab80da3a1844 /tests/coroutines.nom
parentc7c657d38f999901225b33482ef3a15994526feb (diff)
Upgrading to version 2.3 (main change: "=" instead of "<-" for
assignment)
Diffstat (limited to 'tests/coroutines.nom')
-rw-r--r--tests/coroutines.nom21
1 files changed, 6 insertions, 15 deletions
diff --git a/tests/coroutines.nom b/tests/coroutines.nom
index 16ef100..54b233e 100644
--- a/tests/coroutines.nom
+++ b/tests/coroutines.nom
@@ -1,19 +1,10 @@
-#!/usr/bin/env nomsu -V1
+#!/usr/bin/env nomsu -V2.3.4.3
#
Tests for the stuff defined in core/control_flow.nom
use "core"
-
-%nums <- []
-%co <-
- coroutine
- -> 4
- -> 5
- repeat 3 times
- -> 6
-for % in coroutine %co
- add % to %nums
-
-assume (%nums = [4,5,6,6,6]) or barf "Coroutine iteration failed"
-
-say "Coroutines test passed."
+%nums = []
+%co = (coroutine (: -> 4; -> 5; repeat 3 times: -> 6))
+for % in coroutine %co (add % to %nums)
+assume (%nums == [4, 5, 6, 6, 6]) or barf "Coroutine iteration failed"
+say "Coroutines test passed." \ No newline at end of file