feat(run_panel): max_output_lines
This commit is contained in:
parent
f22eccfa89
commit
2613399d01
3 changed files with 5 additions and 4 deletions
|
|
@ -117,6 +117,7 @@ Here's an example configuration with lazy.nvim: >
|
|||
next_test_key = "<c-n>",
|
||||
prev_test_key = "<c-p>",
|
||||
toggle_diff_key = "t",
|
||||
max_output_lines = 50,
|
||||
},
|
||||
diff = {
|
||||
git = {
|
||||
|
|
|
|||
|
|
@ -470,7 +470,7 @@ local function toggle_run_panel(is_debug)
|
|||
local execute_module = require('cp.execute')
|
||||
local contest_config = config.contests[state.platform]
|
||||
if execute_module.compile_problem(ctx, contest_config, is_debug) then
|
||||
test_module.run_all_test_cases(ctx, contest_config)
|
||||
test_module.run_all_test_cases(ctx, contest_config, config)
|
||||
end
|
||||
|
||||
refresh_run_panel()
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ function M.run_test_case(ctx, contest_config, cp_config, index)
|
|||
logger.log(('running test case %d'):format(index))
|
||||
test_case.status = 'running'
|
||||
|
||||
local result = run_single_test_case(ctx, contest_config, test_case)
|
||||
local result = run_single_test_case(ctx, contest_config, cp_config, test_case)
|
||||
|
||||
test_case.status = result.status
|
||||
test_case.actual = result.actual
|
||||
|
|
@ -276,10 +276,10 @@ end
|
|||
---@param ctx ProblemContext
|
||||
---@param contest_config ContestConfig
|
||||
---@return TestCase[]
|
||||
function M.run_all_test_cases(ctx, contest_config)
|
||||
function M.run_all_test_cases(ctx, contest_config, cp_config)
|
||||
local results = {}
|
||||
for i, _ in ipairs(run_panel_state.test_cases) do
|
||||
M.run_test_case(ctx, contest_config, i)
|
||||
M.run_test_case(ctx, contest_config, cp_config, i)
|
||||
table.insert(results, run_panel_state.test_cases[i])
|
||||
end
|
||||
return results
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue