extended test
authorStefan Behnel <stefan_ml@behnel.de>
Sun, 8 Jul 2012 12:53:52 +0000 (14:53 +0200)
committerStefan Behnel <stefan_ml@behnel.de>
Sun, 8 Jul 2012 12:53:52 +0000 (14:53 +0200)
tests/run/cpp_stl_string.pyx

index 2d4a9bd..e7f1a73 100644 (file)
@@ -143,6 +143,14 @@ def test_cstr(char *a):
     cdef string b = string(a)
     return b.c_str()
 
+def test_decode(char* a):
+    """
+    >>> test_decode(b_asdf) == 'asdf'
+    True
+    """
+    cdef string b = string(a)
+    return b.decode('ascii')
+
 def test_equals_operator(char *a, char *b):
     """
     >>> test_equals_operator(b_asdf, b_asdf)