save 2 more alternate formats for test failures
[?]
Jan 23, 2023, 12:21 AM
5ZCQGZP5VK6RIXOFQ7L4OGXFRRBPWWJNQYTWVUKJRCO7UTBPA3IACDependencies
- [2]
3QMTXKWNrename - [3]
ORRSP7FVdeduce test names on failures - [4]
CZQ3NJ4NMerge text0 - [5]
Q7HDVBN7keep some prints in the terminal for now - [6]
FCFJVYKYredundant check - [7]
IMEJA43Lsnapshot - [8]
S4IAYCIRdelete all tests once they've executed - [9]
AVTNUQYRbasic test-enabled framework - [10]
D5J7IZADdebug helper: run a single test - [11]
JNJ4R56Xsupport running tests multiple times - [*]
3QNOKBFMbeginnings of a test harness
Change contents
- replacement in app.lua at line 436
xpcall(_G[name], function(err) add_debug_info_to_test_failure(name, err) end)xpcall(_G[name], function(err) record_error_with_heuristic_location(name, err) end) - replacement in app.lua at line 445
xpcall(test, function(err) add_debug_info_to_test_failure('', err) end)xpcall(test, function(err) record_error_with_heuristic_location('', err) end) - replacement in app.lua at line 449
-- add test_name and file/line/testfunction add_debug_info_to_test_failure(test_name, err)-- Test_errors will be an arrayfunction record_error(test_name, err)local err_without_line_number = err:gsub('^[^:]*:[^:]*: ', '')table.insert(Test_errors, test_name..' -- '..err_without_line_number)end-- Test_errors will be an array-- add test_name and guess at file/linefunction record_error_with_heuristic_location(test_name, err) - edit in app.lua at line 463
end-- Test_errors will be a table by test namefunction record_error_with_stack_trace(test_name, err)local err_without_line_number = err:gsub('^[^:]*:[^:]*: ', '')Test_errors[test_name] = debug.traceback(err_without_line_number)