From 3b8f7c0b3c8cde8b2c61d36698ae7555ee7ec5e1 Mon Sep 17 00:00:00 2001 From: Skkeye Date: Fri, 2 Oct 2026 10:42:44 -0400 Subject: [PATCH] Test the chart key, a plain :tidy and :tag on a selection Three things the stage 9a summary lists, run end to end before listing them: =c, :tidy with no layout (a mind map), and :tag on the nodes selected when : was typed. Co-Authored-By: Claude Opus 5.5 --- src/app/tests/arrange.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app/tests/arrange.rs b/src/app/tests/arrange.rs index 690444f..1ae8841 100644 --- a/src/app/tests/arrange.rs +++ b/src/app/tests/arrange.rs @@ -27,12 +27,18 @@ fn tidy_lays_a_branch_out_as_a_mind_map() { assert_eq!(rect(&h, "Cedar, untreated").left(), rect(&h, "Raised beds").right() + 6); h.type_keys("u"); assert_eq!(h.pos("Soil"), CanvasPos::new(22, 2), "one undo step"); + h.type_keys("gg:tidy"); + assert!( + h.message().starts_with("tidied Garden plans as a mind map"), + "a map unless it says: {}", + h.message() + ); } #[test] fn a_chart_sends_its_lines_down_and_a_grid_makes_a_block() { let mut h = Harness::new(); - h.type_keys(":tidy chart"); + h.type_keys("=c"); let (root, soil) = (rect(&h, "Garden plans"), rect(&h, "Soil")); assert_eq!(soil.top(), root.bottom() + 2, "the children below"); let (_, row) = h.find("┃ Garden plans ┃"); @@ -81,6 +87,8 @@ fn align_lines_up_a_selection() { assert!(["Soil", "Raised beds", "Watering"].iter().all(|title| red(&h, title))); h.type_keys("u"); assert!(!red(&h, "Soil") && !red(&h, "Watering"), "one undo step"); + h.type_keys("ggglvjj:tag +wood"); + assert!(["Soil", "Raised beds", "Watering"].iter().all(|title| h.tags(title).contains("#wood"))); // Without a selection, :align says what it needs. h.type_keys(":align left"); assert_eq!(h.message(), "select the nodes to line up first: v, then hjkl");