wip: test coverage for cell replacement

This commit is contained in:
Jeremy Wall 2024-12-29 19:09:42 -05:00
parent 247674530b
commit 92b02eea78

View File

@ -654,3 +654,23 @@ fn test_quit() {
.expect("Failed to run input script");
assert!(result.is_some());
}
#[test]
fn test_cell_replace() {
let mut ws =
Workspace::new_empty("en", "America/New_York").expect("Failed to get empty workbook");
ws.book.edit_current_cell("foo").expect("Failed to edit current cell");
assert_eq!("foo",
ws.book.get_current_cell_contents().expect("failed to get cell contents").as_str());
InputScript::default()
.char('s')
.char('b')
.char('a')
.char('r')
.enter()
.run(&mut ws)
.expect("Failed to run input script");
assert_eq!("bar",
ws.book.get_current_cell_contents().expect("failed to get cell contents").as_str());
}