Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

test: delete tautological spacing_test, drop orphan completion comment (#2829)

Worktrunk Bot6a6097223b57
diff --git a/src/commands/list/mod.rs b/src/commands/list/mod.rs
index ecde4ad79..3f3302b8d 100644
--- a/src/commands/list/mod.rs
+++ b/src/commands/list/mod.rs
@@ -128,9 +128,6 @@ pub mod progressive;
mod progressive_table;
pub(crate) mod render;
-#[cfg(test)]
-mod spacing_test;
-
// Layout is calculated in collect/mod.rs
use anstyle::Style;
use anyhow::Context;
diff --git a/src/commands/list/spacing_test.rs b/src/commands/list/spacing_test.rs
deleted file mode 100644
index 9cce8cd85..000000000
--- a/src/commands/list/spacing_test.rs
+++ /dev/null
@@ -1,54 +0,0 @@
-//! Test to reproduce the spacing alignment bug
-//!
-//! This test verifies that header and data rows align properly,
-//! regardless of whether cells have ANSI styling applied.
-
-use anstyle::{AnsiColor, Color, Style};
-use worktrunk::styling::StyledLine;
-
-#[test]
-fn test_header_data_alignment_with_and_without_styling() {
- // Simulate what happens in the actual rendering
-
- // Header (always styled with dim)
- let mut header = StyledLine::new();
- let branch_width = 6;
- let branch_header = format!("{:width$}", "Branch", width = branch_width);
- header.push_styled(branch_header, Style::new().dimmed());
- header.push_raw(" "); // separator
- let age_header = format!("{:width$}", "Age", width = 14);
- header.push_styled(age_header, Style::new().dimmed());
-
- // Data row 1: with styling (styled cell)
- let mut row1 = StyledLine::new();
- let branch1_text = format!("{:width$}", "main", width = branch_width);
- row1.push_styled(
- branch1_text.clone(),
- Style::new().fg_color(Some(Color::Ansi(AnsiColor::Cyan))),
- ); // Styled
- row1.push_raw(" "); // separator
- let time1_text = format!("{:width$}", "23 minutes ago", width = 14);
- row1.push_styled(time1_text, Style::new().dimmed());
-
- // Data row 2: without styling (raw cell)
- let mut row2 = StyledLine::new();
- let branch2_text = format!("{:width$}", "foo", width = branch_width);
- row2.push_raw(branch2_text.clone()); // NOT styled
- row2.push_raw(" "); // separator
- let time2_text = format!("{:width$}", "23 minutes ago", width = 14);
- row2.push_styled(time2_text, Style::new().dimmed());
-
- // Check that all rows have the same width up to the time column
- let header_width_before_time = branch_width + 2; // branch + separator
- let row1_width_before_time = branch_width + 2;
- let row2_width_before_time = branch_width + 2;
-
- assert_eq!(
- header_width_before_time, row1_width_before_time,
- "Header and styled row should align"
- );
- assert_eq!(
- header_width_before_time, row2_width_before_time,
- "Header and unstyled row should align"
- );
-}
diff --git a/tests/integration_tests/completion.rs b/tests/integration_tests/completion.rs
index 099de6ff3..d30f491a6 100644
--- a/tests/integration_tests/completion.rs
+++ b/tests/integration_tests/completion.rs
@@ -952,8 +952,6 @@ fn test_complete_init_shell_all_variations(repo: TestRepo) {
assert!(shells.contains(&"zsh"));
}
-// test_complete_init_shell_all_with_source removed - duplicate of test_complete_init_shell_with_source_flag
-
#[rstest]
fn test_complete_list_format_flag(repo: TestRepo) {
repo.commit("initial");