diff options
| author | osch <oliver at luced de> | 2018-09-04 21:59:23 +0200 |
|---|---|---|
| committer | osch <oliver at luced de> | 2018-09-04 22:03:35 +0200 |
| commit | d534bfc9586c1260d3255f949b7aa6f48511af3a (patch) | |
| tree | 1d626db1933134cc1f127d526ad5cdb30a9775b0 /test | |
| parent | f5f119f51a0241f8bbb1f8710fb37119b375539b (diff) | |
| download | lua-llthreads2-d534bfc9586c1260d3255f949b7aa6f48511af3a.tar.gz lua-llthreads2-d534bfc9586c1260d3255f949b7aa6f48511af3a.tar.bz2 lua-llthreads2-d534bfc9586c1260d3255f949b7aa6f48511af3a.zip | |
avoid NULL as parameter to lua_concat in llthread_log
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_error.lua | 40 |
1 files changed, 32 insertions, 8 deletions
diff --git a/test/test_error.lua b/test/test_error.lua index 1407ea8..341105e 100644 --- a/test/test_error.lua +++ b/test/test_error.lua | |||
| @@ -5,13 +5,37 @@ local include = utils.thread_init .. [[ | |||
| 5 | local llthreads = require"llthreads" | 5 | local llthreads = require"llthreads" |
| 6 | ]] | 6 | ]] |
| 7 | 7 | ||
| 8 | local thread = llthreads.new(include .. [[ | 8 | do |
| 9 | error({}) | 9 | local thread = llthreads.new(include .. [[ |
| 10 | ]]) | 10 | error({}) |
| 11 | 11 | ]]) | |
| 12 | thread:start() | 12 | |
| 13 | local ok, err = thread:join() | 13 | thread:start() |
| 14 | print(ok, err) | 14 | local ok, err = thread:join() |
| 15 | assert(not ok) | 15 | print(ok, err) |
| 16 | assert(not ok) | ||
| 17 | end | ||
| 18 | do | ||
| 19 | local thread = llthreads.new(include .. [[ | ||
| 20 | llthreads.set_logger(function(msg) print("XXX", msg) end) | ||
| 21 | error({}) | ||
| 22 | ]]) | ||
| 23 | |||
| 24 | thread:start() | ||
| 25 | local ok, err = thread:join() | ||
| 26 | print(ok, err) | ||
| 27 | assert(not ok) | ||
| 28 | end | ||
| 29 | do | ||
| 30 | local thread = llthreads.new(include .. [[ | ||
| 31 | llthreads.set_logger(function(msg) end) | ||
| 32 | error({}) | ||
| 33 | ]]) | ||
| 34 | |||
| 35 | thread:start() | ||
| 36 | local ok, err = thread:join() | ||
| 37 | print(ok, err) | ||
| 38 | assert(not ok) | ||
| 39 | end | ||
| 16 | print("Done!") | 40 | print("Done!") |
| 17 | 41 | ||
