diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-03-26 09:49:03 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-03-26 09:49:03 -0700 |
commit | 46e568c4c566b6377b90daad211d16a59c540e4b (patch) | |
tree | b20b073e02418e18c108cc0c2e62b5ff8e42eda4 /app.lua | |
parent | 9fff5b713214263a1565cf933f5db165483a5081 (diff) | |
parent | eae5c9505c665b343af7690d9665431ae17ed5e9 (diff) | |
download | text.love-46e568c4c566b6377b90daad211d16a59c540e4b.tar.gz |
Merge lines.love
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 |