From 88d5ea1528f26523315b723e75a5daa13564d7c4 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Tue, 16 Sep 2025 00:25:40 -0400 Subject: [PATCH] update --- lua/cp/execute.lua | 1 - lua/cp/init.lua | 12 ++++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/lua/cp/execute.lua b/lua/cp/execute.lua index d52b970..9398d2c 100644 --- a/lua/cp/execute.lua +++ b/lua/cp/execute.lua @@ -64,7 +64,6 @@ local function build_command(cmd_template, executable, substitutions) return cmd end - local function ensure_directories() vim.system({ "mkdir", "-p", "build", "io" }):wait() end diff --git a/lua/cp/init.lua b/lua/cp/init.lua index 43aa091..d341466 100644 --- a/lua/cp/init.lua +++ b/lua/cp/init.lua @@ -303,6 +303,10 @@ local function toggle_test_panel() local prefix = i == test_state.current_index and "> " or " " local tab = string.format("%s%d.", prefix, i) + if test_case.ok ~= nil then + tab = tab .. string.format(" [ok:%-5s]", tostring(test_case.ok)) + end + if test_case.code then tab = tab .. string.format(" [code:%-" .. max_code_width .. "s]", tostring(test_case.code)) end @@ -312,10 +316,6 @@ local function toggle_test_panel() tab = tab .. string.format(" [time:%-" .. max_time_width .. "s]", time_text) end - if test_case.ok ~= nil then - tab = tab .. string.format(" [ok:%-5s]", tostring(test_case.ok)) - end - if test_case.signal then tab = tab .. string.format(" [%s]", test_case.signal) end @@ -327,7 +327,6 @@ local function toggle_test_panel() if current_test then table.insert(tab_lines, "") table.insert(tab_lines, "Input:") - table.insert(tab_lines, "") for _, line in ipairs(vim.split(current_test.input, "\n", { plain = true, trimempty = true })) do table.insert(tab_lines, line) end @@ -336,7 +335,6 @@ local function toggle_test_panel() return tab_lines end - local function update_expected_pane() local test_state = test_module.get_test_panel_state() local current_test = test_state.test_cases[test_state.current_index] @@ -347,7 +345,6 @@ local function toggle_test_panel() local expected_lines = {} table.insert(expected_lines, "Expected:") - table.insert(expected_lines, "") local expected_text = current_test.expected for _, line in ipairs(vim.split(expected_text, "\n", { plain = true, trimempty = true })) do @@ -369,7 +366,6 @@ local function toggle_test_panel() if current_test.actual then table.insert(actual_lines, "Actual:") - table.insert(actual_lines, "") for _, line in ipairs(vim.split(current_test.actual, "\n", { plain = true, trimempty = true })) do table.insert(actual_lines, line) end