projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01b72ec
)
extended test
author
Stefan Behnel
<stefan_ml@behnel.de>
Sun, 8 Jul 2012 12:53:52 +0000
(14:53 +0200)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Sun, 8 Jul 2012 12:53:52 +0000
(14:53 +0200)
tests/run/cpp_stl_string.pyx
patch
|
blob
|
history
diff --git
a/tests/run/cpp_stl_string.pyx
b/tests/run/cpp_stl_string.pyx
index
2d4a9bd
..
e7f1a73
100644
(file)
--- a/
tests/run/cpp_stl_string.pyx
+++ b/
tests/run/cpp_stl_string.pyx
@@
-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)