new test cases from Pyrex
authorStefan Behnel <scoder@users.berlios.de>
Wed, 11 Jun 2008 19:56:35 +0000 (21:56 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Wed, 11 Jun 2008 19:56:35 +0000 (21:56 +0200)
tests/errors/se_conddef.pyx [new file with mode: 0644]
tests/errors/se_mixtabspace.pyx [new file with mode: 0644]
tests/errors/se_multass.pyx [new file with mode: 0644]
tests/errors/se_nestdef.pyx [new file with mode: 0644]

diff --git a/tests/errors/se_conddef.pyx b/tests/errors/se_conddef.pyx
new file mode 100644 (file)
index 0000000..4a703ed
--- /dev/null
@@ -0,0 +1,6 @@
+if x:
+       def h():
+               pass
+_ERRORS = u"""
+/Local/Projects/D/Pyrex/Source/Tests/Errors1/se_conddef.pyx:2:1: def statement not allowed here
+"""
diff --git a/tests/errors/se_mixtabspace.pyx b/tests/errors/se_mixtabspace.pyx
new file mode 100644 (file)
index 0000000..05fe446
--- /dev/null
@@ -0,0 +1,6 @@
+def f():
+ a = b # space space
+       c = d # tab
+_ERRORS = u"""
+/Local/Projects/D/Pyrex/Source/Tests/Errors1/se_mixtabspace.pyx:3:0: Mixed use of tabs and spaces
+"""
diff --git a/tests/errors/se_multass.pyx b/tests/errors/se_multass.pyx
new file mode 100644 (file)
index 0000000..5e19204
--- /dev/null
@@ -0,0 +1,6 @@
+def f(obj1a, obj2a, obj3a, obj1b, obj2b, obj3b, obj4b):
+       obj1a, (obj2a, obj3a) = obj1b, (obj2b, obj3b, obj4b)
+
+_ERRORS = u"""
+2:9: Unpacking sequence of wrong size (expected 2, got 3)
+"""
diff --git a/tests/errors/se_nestdef.pyx b/tests/errors/se_nestdef.pyx
new file mode 100644 (file)
index 0000000..c23c3ca
--- /dev/null
@@ -0,0 +1,6 @@
+def f():
+       def g():
+               pass
+_ERRORS = u"""
+/Local/Projects/D/Pyrex/Source/Tests/Errors1/se_nestdef.pyx:2:1: def statement not allowed here
+"""