fix(commands): deny list during BEDIT

Refuse LAYOUT, VPORTS, MVIEW, WBLOCK, PURGE, RENAME, REFEDIT,
REFEDIT_BEGIN and PLOT from the command line while a block editor
session is open, matching the reference product's
"<CMD> command not allowed in block editor" behaviour (spec section 8,
based on the V7 hands-on check). XREF, NEW, OPEN and SAVEAS stay
allowed. The service-level RENAME guard stays as defense in depth.
This commit is contained in:
Karim Jerbi committed 2026-10-15 20:06:41 +01:00
1 parent 43cca2094b
commit 4143a01ff4
3 files changed
+139 -3

No files matched your search

+6 -3
View File
@@ -626,6 +626,9 @@ fn locked_rename_refuses_anonymous_and_layout_records_with_the_shared_text() {
}
/// A rename refuses a block with an open BEDIT session, whatever the new name.
/// V7: the RENAME verb itself is refused at the command choke point while a
/// session is open; the block service keeps its own refusal as defense in
/// depth for the non-command paths (control op, palette).
#[test]
fn locked_rename_refuses_a_block_with_an_open_bedit_session() {
let mut app = app();
@@ -639,9 +642,9 @@ fn locked_rename_refuses_a_block_with_an_open_bedit_session() {
assert_eq!(undo_entry_count(&app), before);
assert_eq!(
errors(&app),
vec![command_line_error(&format!(
"block \"{name}\" is open in the block editor; close the editor first"
))]
vec![command_line_error(
"RENAME command not allowed in block editor"
)]
);
let _ = app.dispatch_command("BEDIT_DISCARD");
}