diff options
Diffstat (limited to 'spec/inputs/test/loops_spec.yue')
-rw-r--r-- | spec/inputs/test/loops_spec.yue | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/inputs/test/loops_spec.yue b/spec/inputs/test/loops_spec.yue index 16531ef..817919f 100644 --- a/spec/inputs/test/loops_spec.yue +++ b/spec/inputs/test/loops_spec.yue | |||
@@ -6,3 +6,18 @@ describe "loops", -> | |||
6 | x | 6 | x |
7 | 7 | ||
8 | assert.same output, { 2,4,6 } | 8 | assert.same output, { 2,4,6 } |
9 | |||
10 | it "continue in repeat", -> | ||
11 | output = {} | ||
12 | a = 0 | ||
13 | repeat | ||
14 | a += 1 | ||
15 | if a == 3 | ||
16 | continue | ||
17 | if a == 5 | ||
18 | break | ||
19 | output[] = a | ||
20 | until a == 8 | ||
21 | |||
22 | assert.same output, { 1,2,4 } | ||
23 | |||