Add testcase for #664
authorVitja Makarov <vitja.makarov@gmail.com>
Thu, 3 Mar 2011 19:38:58 +0000 (22:38 +0300)
committerVitja Makarov <vitja.makarov@gmail.com>
Thu, 3 Mar 2011 19:38:58 +0000 (22:38 +0300)
tests/run/starred_target_T664.pyx [new file with mode: 0644]

diff --git a/tests/run/starred_target_T664.pyx b/tests/run/starred_target_T664.pyx
new file mode 100644 (file)
index 0000000..b0e2069
--- /dev/null
@@ -0,0 +1,23 @@
+def assign():
+    """
+    >>> assign()
+    (1, [2, 3, 4, 5])
+    """
+    a, *b = 1, 2, 3, 4, 5
+    return a, b
+
+def assign3():
+    """
+    >>> assign3()
+    (1, [2, 3, 4, 5], 6)
+    """
+    a, *b, c = 1, 2, 3, 4, 5, 6
+    return a, b, c
+
+def assign4():
+    """
+    >>> assign4()
+    (1, [2, 3, 4], 5, 6)
+    """
+    a, *b, c, d = 1, 2, 3, 4, 5, 6
+    return a, b, c, d