new test case for ticket #505 (cimport cython)
authorStefan Behnel <scoder@users.berlios.de>
Mon, 8 Feb 2010 10:08:37 +0000 (11:08 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Mon, 8 Feb 2010 10:08:37 +0000 (11:08 +0100)
tests/run/cimport_cython_T505.pyx [new file with mode: 0644]

diff --git a/tests/run/cimport_cython_T505.pyx b/tests/run/cimport_cython_T505.pyx
new file mode 100644 (file)
index 0000000..13a89d8
--- /dev/null
@@ -0,0 +1,11 @@
+cimport cython
+
+cdef extern from "Python.h":
+    cdef cython.unicode PyUnicode_DecodeUTF8(char* s, Py_ssize_t size, char* errors)
+
+def test_capi():
+    """
+    >>> print(test_capi())
+    abc
+    """
+    return PyUnicode_DecodeUTF8("abc", 3, NULL)