From 15dd3a225134afab649a3c1994cbd862f1b11439 Mon Sep 17 00:00:00 2001 From: Araq Date: Sun, 20 May 2012 10:56:17 +0200 Subject: fixes #109 --- tests/run/tcontinue.nim | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/run/tcontinue.nim (limited to 'tests/run') 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" -- cgit 1.4.1-2-gfad0 cted='selected'>devel This repository contains the Nim compiler, Nim's stdlib, tools, and documentation. (mirror)ahoang <ahoang@tilde.institute>
summary refs log blame commit diff stats
path: root/tests/misc/t99bott.nim
blob: 62ccfbe162f837ee5e01b73be483d45618162a6e (plain) (tree)
1
2
3
4
5
6
7
8
9