diff --git a/src/shell/lua/CMakeLists.txt b/src/shell/lua/CMakeLists.txt index d33613a1b..c23d32f39 100644 --- a/src/shell/lua/CMakeLists.txt +++ b/src/shell/lua/CMakeLists.txt @@ -3,3 +3,11 @@ target_link_libraries(leanlua ${EXTRA_LIBS}) add_test(NAME leanluatests WORKING_DIRECTORY "${LEAN_SOURCE_DIR}/../tests/lua" COMMAND "./test.sh" "${CMAKE_CURRENT_BINARY_DIR}/leanlua") + +if((${CYGWIN} EQUAL "1") OR (${CMAKE_SYSTEM_NAME} MATCHES "Linux")) + if (NOT (${CMAKE_CXX_COMPILER} MATCHES "clang")) + add_test(NAME leanluathreadtests + WORKING_DIRECTORY "${LEAN_SOURCE_DIR}/../tests/lua/threads" + COMMAND "../test.sh" "${CMAKE_CURRENT_BINARY_DIR}/leanlua") + endif() +endif() diff --git a/tests/lua/threads/util.lua b/tests/lua/threads/util.lua new file mode 100644 index 000000000..ccd3ccac8 --- /dev/null +++ b/tests/lua/threads/util.lua @@ -0,0 +1,11 @@ +-- Execute f, and make sure is throws an error +function check_error(f) + ok, msg = pcall(function () + f() + end) + if ok then + error("unexpected success...") + else + print("caught expected error: ", msg) + end +end