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: <Space>=c, :tidy with no layout (a mind map), and :tag on the
nodes selected when : was typed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
skkeyeandClaude Opus 5.5 committed 2026-10-02 10:42:44 -04:00
1 parent 13a603837e
commit 3b8f7c0b3c
1 file changed
+9 -1
+9 -1
View File
@@ -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<CR>");
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<CR>");
h.type_keys("<Space>=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<CR>");
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<CR>");
assert_eq!(h.message(), "select the nodes to line up first: v, then hjkl");