diff options
Diffstat (limited to 'app.lua')
-rw-r--r-- | app.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app.lua b/app.lua index 627a438..263518c 100644 --- a/app.lua +++ b/app.lua @@ -130,6 +130,8 @@ function App.run_tests() end end table.sort(sorted_names) +--? App.initialize_for_test() -- debug: run a single test at a time like these 2 lines +--? test_click_below_all_lines() for _,name in ipairs(sorted_names) do App.initialize_for_test() --? print('=== '..name) @@ -404,9 +406,10 @@ end -- prepend file/line/test function prepend_debug_info_to_test_failure(test_name, err) local err_without_line_number = err:gsub('^[^:]*:[^:]*: ', '') - local stack_trace = debug.traceback('', --[[stack frame]]5) + local stack_trace = debug.traceback('', --[[stack frame]]5) -- most likely to be useful, but set to 0 for a complete stack trace local file_and_line_number = stack_trace:gsub('stack traceback:\n', ''):gsub(': .*', '') local full_error = file_and_line_number..':'..test_name..' -- '..err_without_line_number + -- uncomment this line for a complete stack trace --? local full_error = file_and_line_number..':'..test_name..' -- '..err_without_line_number..'\t\t'..stack_trace:gsub('\n', '\n\t\t') table.insert(Test_errors, full_error) end |