save 2 more alternate formats for test failures

[?]
Jan 23, 2023, 12:21 AM
5ZCQGZP5VK6RIXOFQ7L4OGXFRRBPWWJNQYTWVUKJRCO7UTBPA3IAC

Dependencies

Change contents

  • replacement in app.lua at line 436
    [3.47][2.18:100]()
    xpcall(_G[name], function(err) add_debug_info_to_test_failure(name, err) end)
    [3.47]
    [3.7548]
    xpcall(_G[name], function(err) record_error_with_heuristic_location(name, err) end)
  • replacement in app.lua at line 445
    [3.143][2.101:175]()
    xpcall(test, function(err) add_debug_info_to_test_failure('', err) end)
    [3.143]
    [3.2065]
    xpcall(test, function(err) record_error_with_heuristic_location('', err) end)
  • replacement in app.lua at line 449
    [3.7569][2.176:268]()
    -- add test_name and file/line/test
    function add_debug_info_to_test_failure(test_name, err)
    [3.7569]
    [3.60839]
    -- Test_errors will be an array
    function 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/line
    function record_error_with_heuristic_location(test_name, err)
  • edit in app.lua at line 463
    [3.61188]
    [3.61188]
    end
    -- Test_errors will be a table by test name
    function 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)