From: Stefan Behnel Date: Fri, 8 Feb 2013 07:44:37 +0000 (+0100) Subject: add disabled test case X-Git-Tag: 0.19b1~212 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1440248bc01a4fec421f05f29659baf9f066f34;p=platform%2Fupstream%2Fpython-cython.git add disabled test case --- diff --git a/tests/run/cdef_function_kwargs.pyx b/tests/run/cdef_function_kwargs.pyx index b45cd8b..493e64f 100644 --- a/tests/run/cdef_function_kwargs.pyx +++ b/tests/run/cdef_function_kwargs.pyx @@ -180,3 +180,24 @@ def cdef_funcptr(): cfunc_ptr(1, b=2) cfunc_ptr(a=1, b=2) cfunc_ptr(b=2, a=1) + + +''' +# This works but currently brings up C compiler warnings +# because the format string is not a literal C string. + +from libc.stdio cimport snprintf + +@cython.test_fail_if_path_exists('//GeneralCallNode') +@cython.test_assert_path_exists('//SimpleCallNode') +def varargs(): + """ + >>> print(varargs()) + abc + """ + cdef char buffer[10] + retval = snprintf(buffer, template="abc", size=10) + if retval < 0: + raise MemoryError() + return buffer[:retval].decode('ascii') +'''