mirror of
https://github.com/storytold/cadcraft.git
synced 2026-12-02 02:38:30 -06:00
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.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user