diff options
Diffstat (limited to 'spec/inputs')
| -rw-r--r-- | spec/inputs/loops.yue | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/inputs/loops.yue b/spec/inputs/loops.yue index 5cadbf0..c5b28b3 100644 --- a/spec/inputs/loops.yue +++ b/spec/inputs/loops.yue | |||
| @@ -196,3 +196,20 @@ do | |||
| 196 | print i | 196 | print i |
| 197 | continue | 197 | continue |
| 198 | print "abc" | 198 | print "abc" |
| 199 | |||
| 200 | do | ||
| 201 | while byte := stream::read_one! | ||
| 202 | -- do something with the byte | ||
| 203 | continue if byte == 0 | ||
| 204 | print byte | ||
| 205 | |||
| 206 | do | ||
| 207 | local func | ||
| 208 | while success, result := try func 1, 2, 3 | ||
| 209 | catch err | ||
| 210 | print err | ||
| 211 | print result | ||
| 212 | |||
| 213 | do | ||
| 214 | until x := func 'a', b do | ||
| 215 | print "false expected" | ||
