diff options
author | Adam Lerer <alerer@fb.com> | 2015-09-18 21:16:08 +0300 |
---|---|---|
committer | Adam Lerer <alerer@fb.com> | 2015-09-18 21:16:08 +0300 |
commit | bad65805d5fca7d81f3e4e0062ac95915f556179 (patch) | |
tree | 6243ba6242bf52bfaf1fe7b192c54b269285aaca /test | |
parent | 1153921a624523ebfd11096b384ae193e83bc1cd (diff) |
Fix return values with xpcall
Diffstat (limited to 'test')
-rw-r--r-- | test/test-traceback.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test-traceback.lua b/test/test-traceback.lua index db50624..98bb815 100644 --- a/test/test-traceback.lua +++ b/test/test-traceback.lua @@ -17,3 +17,12 @@ my_threads:addjob(function() ok, res = pcall(my_threads.synchronize, my_threads) assert(ok == false) assert(res:find("in function 'evil_func'")) + +my_threads:addjob(function() + return 10 + end, + function(x) + assert(x == 10) + end) + +my_threads:synchronize() |