diff options
author | moteus <mimir@newmail.ru> | 2013-12-26 19:09:21 +0400 |
---|---|---|
committer | moteus <mimir@newmail.ru> | 2013-12-26 19:09:21 +0400 |
commit | 1e6ac084cf3f3b44295a55f0102dcbc4907c6fbb (patch) | |
tree | 1dcbe7cc746412c247429879c073ce8da4cb1175 /test | |
parent | d19ff5561a442e18953130e0f21ac97b9bac4618 (diff) | |
download | lua-llthreads2-1e6ac084cf3f3b44295a55f0102dcbc4907c6fbb.tar.gz lua-llthreads2-1e6ac084cf3f3b44295a55f0102dcbc4907c6fbb.tar.bz2 lua-llthreads2-1e6ac084cf3f3b44295a55f0102dcbc4907c6fbb.zip |
Fix. Register LuaJIT built-in libraries.
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 | ||