mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-27 02:23:56 +00:00
test(engine): Copy with a bare caret beside an object is disabled, like Cut (#7892)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
73f42fd607
commit
ca8feb71aa
@@ -6281,8 +6281,8 @@ fn cut_and_copy_with_bare_caret_beside_object_change_nothing() {
|
||||
assert!(s.sel.is_collapsed());
|
||||
assert!(crate::cmd::objects::object_selection(&s).is_none());
|
||||
|
||||
let copy_res = run(&mut s, "edit.copy", json!({}));
|
||||
assert_eq!(copy_res["text"], "", "copy on bare caret returns empty text");
|
||||
let copy_res = s.run("edit.copy", &json!({}));
|
||||
assert!(matches!(copy_res, Err(crate::CmdError::Disabled(_))), "copy on bare caret is disabled");
|
||||
assert!(s.clipboard.is_none(), "clipboard remains unset");
|
||||
|
||||
let cut_res = s.run("edit.cut", &json!({}));
|
||||
@@ -6297,8 +6297,8 @@ fn cut_and_copy_with_bare_caret_beside_object_change_nothing() {
|
||||
assert!(s.sel.is_collapsed());
|
||||
assert!(crate::cmd::objects::object_selection(&s).is_none());
|
||||
|
||||
let copy_res = run(&mut s, "edit.copy", json!({}));
|
||||
assert_eq!(copy_res["text"], "", "copy on bare caret returns empty text");
|
||||
let copy_res = s.run("edit.copy", &json!({}));
|
||||
assert!(matches!(copy_res, Err(crate::CmdError::Disabled(_))), "copy on bare caret is disabled");
|
||||
assert!(s.clipboard.is_none(), "clipboard remains unset");
|
||||
|
||||
let cut_res = s.run("edit.cut", &json!({}));
|
||||
|
||||
Reference in New Issue
Block a user