From cd91518d79388d5d42820a2b48918a7bf1e6d1a2 Mon Sep 17 00:00:00 2001 From: osch Date: Mon, 27 Aug 2018 19:06:15 +0200 Subject: interrupted error message now contains llthreads module name as prefix and is also available in the public api --- test/test_interrupt.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/test_interrupt.lua b/test/test_interrupt.lua index 6a7a255..22c168e 100644 --- a/test/test_interrupt.lua +++ b/test/test_interrupt.lua @@ -18,7 +18,7 @@ do local ok, err = thread:join() print("thread1:join(): ", ok, err) - assert(ok == false and err:match("interrupted!"), "thread1 result") + assert(ok == false and err:match(llthreads.interrupted_error), "thread1 result") print("--- Done interrupt1!") end @@ -27,7 +27,7 @@ do local thread = llthreads.new(include .. [[ local ok, err = pcall(function() for i = 1, 10 do sleep(1) end end) print("thread2:", ok, err) - assert(ok == false and err:match("interrupted!"), "interrupt2 result") + assert(ok == false and err:match(llthreads.interrupted_error), "interrupt2 result") ]]) thread:start() @@ -52,7 +52,7 @@ do local ok, err = thread:join() print("thread3:join(): ", ok, err) - assert(ok == false and err:match("interrupted!"), "thread3 result") + assert(ok == false and err:match(llthreads.interrupted_error), "thread3 result") print("--- Done interrupt3!") end -- cgit v1.2.3-55-g6feb