Author: Armin Rigo <[email protected]>
Branch:
Changeset: r2199:0f549bccae62
Date: 2015-07-03 08:51 +0200
http://bitbucket.org/cffi/cffi/changeset/0f549bccae62/
Log: Write a test for issue #212
diff --git a/testing/cffi1/test_verify1.py b/testing/cffi1/test_verify1.py
--- a/testing/cffi1/test_verify1.py
+++ b/testing/cffi1/test_verify1.py
@@ -2230,3 +2230,15 @@
#
ffi.cdef("typedef int... foo_t;")
py.test.raises(VerificationError, ffi.verify, "typedef float foo_t;")
+
+def test_windows_dllimport_data():
+ if sys.platform != 'win32':
+ py.test.skip("Windows only")
+ from testing.udir import udir
+ tmpfile = udir.join('dllimport_data.c')
+ tmpfile.write('int my_value = 42;\n')
+ ffi = FFI()
+ ffi.cdef("int my_value;")
+ lib = ffi.verify("extern __declspec(dllimport) int my_value;",
+ sources = [str(tmpfile)])
+ assert lib.my_value == 42
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit