aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/test/loops_spec.yue
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2022-07-27 11:39:50 +0800
committerLi Jin <dragon-fly@qq.com>2022-07-27 11:39:50 +0800
commit8df3b854939a63b14aab3fd4688b0caea3daf1dc (patch)
tree5c142c53bd1f60ede9603f9ba05be731bad61b60 /spec/inputs/test/loops_spec.yue
parent0f5bdeaeba0f04e49c47f4a2be55b14185a7dfdd (diff)
downloadyuescript-8df3b854939a63b14aab3fd4688b0caea3daf1dc.tar.gz
yuescript-8df3b854939a63b14aab3fd4688b0caea3daf1dc.tar.bz2
yuescript-8df3b854939a63b14aab3fd4688b0caea3daf1dc.zip
adding test cases.
Diffstat (limited to 'spec/inputs/test/loops_spec.yue')
-rw-r--r--spec/inputs/test/loops_spec.yue13
1 files changed, 6 insertions, 7 deletions
diff --git a/spec/inputs/test/loops_spec.yue b/spec/inputs/test/loops_spec.yue
index 68b5f97..16531ef 100644
--- a/spec/inputs/test/loops_spec.yue
+++ b/spec/inputs/test/loops_spec.yue
@@ -1,9 +1,8 @@
1
2describe "loops", -> 1describe "loops", ->
3 it "should continue", -> 2 it "should continue", ->
4 input = {1,2,3,4,5,6} 3 input = {1,2,3,4,5,6}
5 output = for x in *input 4 output = for x in *input
6 continue if x % 2 == 1 5 continue if x % 2 == 1
7 x 6 x
8 7
9 assert.same output, { 2,4,6 } 8 assert.same output, { 2,4,6 }