mirror of
https://github.com/zaphar/sheetsui.git
synced 2025-07-22 13:00:22 -04:00
wip: test coverage for cell replacement
This commit is contained in:
parent
247674530b
commit
92b02eea78
@ -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());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user