diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-12-28 22:52:06 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-12-28 22:52:06 -0800 |
commit | a42711e31cdb41e3c504ed161c07e56698d29e7a (patch) | |
tree | c07fc05377ac525af7e009046c7bec2565ffc5d1 /tests/test9.in | |
parent | c632307eaa4fdd8ac09bb1a9bf031101b1e0b6a2 (diff) |
Support for break/continue with new parser execution
Diffstat (limited to 'tests/test9.in')
-rw-r--r-- | tests/test9.in | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/test9.in b/tests/test9.in index a38fbc7c..a16281f1 100644 --- a/tests/test9.in +++ b/tests/test9.in @@ -35,3 +35,37 @@ emit test3 foo bar # test empty argument emit + +echo "Test break and continue" +# This should output Ping once +for i in a b c + if not contains $i c ; continue ; end + echo Ping +end + +# This should output Pong not at all +for i in a b c + if not contains $i c ; break ; end + echo Pong +end + +# This should output Foop three times, and Boop not at all +set i a a a +while contains $i a + set -e i[-1] + echo Foop + continue + echo Boop +end + +# This should output Doop once +set i a a a +while contains $i a + set -e i[-1] + echo Doop + break + echo Darp +end + + +false |