test for ticket #533: reference leak in 'continue' statement
authorStefan Behnel <scoder@users.berlios.de>
Sat, 8 May 2010 20:35:17 +0000 (22:35 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 8 May 2010 20:35:17 +0000 (22:35 +0200)
tests/bugs.txt
tests/run/for_in_break_continue_T533.pyx [new file with mode: 0644]

index 8a3837d4037abb8f68e524a5e232fbee17338389..89742374f4d1c09dc5d449f7353646335fa18541 100644 (file)
@@ -9,6 +9,7 @@ missing_baseclass_in_predecl_T262
 cfunc_call_tuple_args_T408
 cascaded_list_unpacking_T467
 compile.cpp_operators
+for_in_break_continue_T533
 
 # CPython regression tests that don't current work:
 pyregr.test_threadsignals
diff --git a/tests/run/for_in_break_continue_T533.pyx b/tests/run/for_in_break_continue_T533.pyx
new file mode 100644 (file)
index 0000000..0608258
--- /dev/null
@@ -0,0 +1,15 @@
+
+def for_in():
+    """
+    >>> for_in()
+    6
+    """
+    i = -1
+    for L in [[], range(5), range(10)]:
+        for i in L:
+            if i > 5:
+                break
+        else:
+            continue
+        break
+    return i