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");