From 683dd0bfec8a2c8e4d28245147e19525c8c24752 Mon Sep 17 00:00:00 2001 From: ZachAR3 Date: Sun, 25 Oct 2026 02:09:31 +0100 Subject: [PATCH] TRIM and EXTEND: test Quick-mode EXTEND through its fence (#1594) The empty-space fence test now drives EXTEND through the second fence point and checks the extended lines, not only the prompt. --- crates/engine/tests/it/trim_extend_options.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/engine/tests/it/trim_extend_options.rs b/crates/engine/tests/it/trim_extend_options.rs index 0f4d50f15..6fe76ee17 100644 --- a/crates/engine/tests/it/trim_extend_options.rs +++ b/crates/engine/tests/it/trim_extend_options.rs @@ -128,6 +128,13 @@ fn a_pick_in_empty_space_starts_a_fence_in_quick_mode_and_a_window_in_standard_m assert!(s.prompt_text().contains("Select object to trim"), "{}", s.prompt_text()); s.cmdline("").unwrap(); assert_eq!(lines(&s), with_edges(&[((-5.0, 0.0), (0.0, 0.0)), ((-5.0, 2.0), (15.0, 2.0)), ((10.0, 0.0), (15.0, 0.0))])); + // EXTEND's fence extends both lines it crosses to the boundary at x = 10. + let mut s = session(&["10,-5 10,5", "0,0 4,0", "0,2 4,2"]); + s.script("EXTEND 3,-1 3,3\n").unwrap(); + assert!(s.prompt_text().contains("Select object to extend"), "{}", s.prompt_text()); + s.cmdline("").unwrap(); + assert!(s.running.is_none(), "{}", s.prompt_text()); + assert_eq!(lines(&s), vec![((0.0, 0.0), (10.0, 0.0)), ((0.0, 2.0), (10.0, 2.0)), ((10.0, -5.0), (10.0, 5.0))]); // Standard mode keeps the crossing window. let mut s = ladder(); s.script("TRIM O S\n\n4,-4\n").unwrap();