summary refs log tree commit diff stats
path: root/tests/misc
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-02-10 14:20:31 +0100
committerAraq <rumpf_a@web.de>2018-02-10 14:20:31 +0100
commit45437eb113c10c6a1d57374b112e720377a38dc3 (patch)
tree16ec4bedea780eae84fb7d6b3151bc62ae42f897 /tests/misc
parent5c5e54d3a9b80c4d472a44e3b79b11d74cf3d1a8 (diff)
downloadNim-45437eb113c10c6a1d57374b112e720377a38dc3.tar.gz
fixes #4220
Diffstat (limited to 'tests/misc')
-rw-r--r--tests/misc/tunsignedcmp.nim22
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/misc/tunsignedcmp.nim b/tests/misc/tunsignedcmp.nim
index 9ffc0d119..4fa4a7705 100644
--- a/tests/misc/tunsignedcmp.nim
+++ b/tests/misc/tunsignedcmp.nim
@@ -1,7 +1,15 @@
 discard """
   output: '''true
 true
-true'''
+true
+5
+4
+3
+2
+1
+0
+it should stop now
+'''
 """
 
 # bug 1420
@@ -11,3 +19,15 @@ echo x > y # works
 
 echo((40'i32) > (30'i32))
 echo((40'u32) > (30'u32)) # Error: ordinal type expected
+
+# bug #4220
+
+const count: uint = 5
+var stop_me = false
+
+for i in countdown(count, 0):
+  echo i
+  if stop_me: break
+  if i == 0:
+    echo "it should stop now"
+    stop_me = true