diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2024-06-11 12:28:45 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2024-06-11 12:28:45 -0700 |
commit | 6ed97fbd947506806d5aa64d574d2621b6ae5bee (patch) | |
tree | 0377fdfdab737c1c145cfe0ab2adf87cbae7017f /app.lua | |
parent | cbf12ee3b89b12a76b9ed7b889a67b4ab7177dbc (diff) | |
parent | 262c078133e1603aa30b3404f4f4b12428d925e5 (diff) | |
download | view.love-6ed97fbd947506806d5aa64d574d2621b6ae5bee.tar.gz |
Merge text.love
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 |