diff options
Diffstat (limited to 'app.lua')
-rw-r--r-- | app.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app.lua b/app.lua index 30fc696..59dff31 100644 --- a/app.lua +++ b/app.lua @@ -369,6 +369,7 @@ function App.run_tests() table.sort(sorted_names) for _,name in ipairs(sorted_names) do App.initialize_for_test() +--? print('=== '..name) xpcall(_G[name], function(err) prepend_debug_info_to_test_failure(name, err) end) end -- clean up all test methods @@ -380,9 +381,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]]4) 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 +--? 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 |