diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_register_ffi.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_register_ffi.lua b/test/test_register_ffi.lua new file mode 100644 index 0000000..e98167f --- /dev/null +++ b/test/test_register_ffi.lua | |||
@@ -0,0 +1,14 @@ | |||
1 | if jit then | ||
2 | local llthreads = require "llthreads" | ||
3 | local thread = llthreads.new([[ | ||
4 | if not package.preload.ffi then | ||
5 | print("ffi does not register in thread") | ||
6 | os.exit(-1) | ||
7 | end | ||
8 | local ok, err = pcall(require, "ffi") | ||
9 | if not ok then | ||
10 | print("can not load ffi: ", err) | ||
11 | os.exit(-2) | ||
12 | end | ||
13 | ]]):start():join() | ||
14 | end | ||