diff options
author | Araq <rumpf_a@web.de> | 2012-05-20 10:56:17 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-05-20 10:56:17 +0200 |
commit | 15dd3a225134afab649a3c1994cbd862f1b11439 (patch) | |
tree | ec3d43cd939b7ab91f25c7b5ac57981967dcbf8f /tests/run | |
parent | e6019b6f98e3e16205f0b9775437352da9324bc6 (diff) | |
download | Nim-15dd3a225134afab649a3c1994cbd862f1b11439.tar.gz |
fixes #109
Diffstat (limited to 'tests/run')
-rw-r--r-- | tests/run/tcontinue.nim | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/run/tcontinue.nim b/tests/run/tcontinue.nim new file mode 100644 index 000000000..092026e8c --- /dev/null +++ b/tests/run/tcontinue.nim @@ -0,0 +1,28 @@ +discard """ + output: "came here" +""" + +var i = 0 +while i < 400: + + if i == 10: break + elif i == 3: + inc i + continue + inc i + +var f = "failure" +var j = 0 +while j < 300: + for x in 0..34: + if j < 300: continue + if x == 10: + echo "failure: should never happen" + break + f = "came here" + break + +if i == 10: + echo f +else: + echo "failure" |