diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2024-06-11 12:13:18 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2024-06-11 12:13:18 -0700 |
commit | 262c078133e1603aa30b3404f4f4b12428d925e5 (patch) | |
tree | 8101bf50db1523f2fc1c4f8d8f6ca7500355ff10 /app.lua | |
parent | a244738b01a2f471fc5bb9ac04421aaa17c6e66c (diff) | |
parent | 55f5c2d696ffba6c5d220d8e317c15ed2335ac7b (diff) | |
download | view.love-262c078133e1603aa30b3404f4f4b12428d925e5.tar.gz |
Merge lines.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 |