aboutsummaryrefslogtreecommitdiff
path: root/test/test_pass_cfunction.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_pass_cfunction.lua')
-rw-r--r--test/test_pass_cfunction.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/test_pass_cfunction.lua b/test/test_pass_cfunction.lua
new file mode 100644
index 0000000..86fcd3d
--- /dev/null
+++ b/test/test_pass_cfunction.lua
@@ -0,0 +1,17 @@
1local llthreads = require"llthreads"
2local utils = require"utils"
3
4local thread = llthreads.new(utils.thread_init .. [[
5 require "llthreads"
6 local fn = ...
7
8 if type(fn) ~= 'function' then
9 print("ERROR! No function : ", fn, type(fn))
10 os.exit(-2)
11 end
12
13 fn("print('Done!'); require'os'.exit(0)"):start():join()
14]], llthreads.new)
15
16print(thread:start():join())
17os.exit(-1) \ No newline at end of file