summaryrefslogtreecommitdiff
path: root/testing/test_function.py
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2012-05-23 13:48:18 +0200
committerArmin Rigo <arigo@tunes.org>2012-05-23 13:48:18 +0200
commit9ff950b088c549e74950832e6ffd2997dc9a09fe (patch)
treee951668a47d28d83c58e5fa19a06a00114357949 /testing/test_function.py
parent1f23ade6133e4dc5c52c5c26c9d63124b642ee0b (diff)
downloadcffi-9ff950b088c549e74950832e6ffd2997dc9a09fe.tar.gz
Test and fix.
Diffstat (limited to 'testing/test_function.py')
-rw-r--r--testing/test_function.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/testing/test_function.py b/testing/test_function.py
index 4eea9d2..0180b6e 100644
--- a/testing/test_function.py
+++ b/testing/test_function.py
@@ -95,6 +95,8 @@ def test_vararg():
with FdWriteCapture() as fd:
ffi.C.printf("hello\n")
ffi.C.printf("hello, %s!\n", ffi.new("const char *", "world"))
+ ffi.C.printf(ffi.new("char[]", "hello, %s!\n"),
+ ffi.new("char[]", "world2"))
ffi.C.printf("hello int %d long %ld long long %lld\n",
ffi.new("int", 42),
ffi.new("long", 84),
@@ -103,6 +105,7 @@ def test_vararg():
res = fd.getvalue()
assert res == ("hello\n"
"hello, world!\n"
+ "hello, world2!\n"
"hello int 42 long 84 long long 168\n")
def test_must_specify_type_of_vararg():