thing-tui diff: a change of rows alone repaints
This commit is contained in:
parent
7266ed1d4a
commit
6cdbb24729
1 changed files with 6 additions and 0 deletions
|
|
@ -197,3 +197,9 @@ fn a_resize_prints_every_cell() {
|
|||
let printed: usize = diff(&old, &new).iter().map(|op| if let Op::Print(s) = op { s.chars().count() } else { 0 }).sum();
|
||||
assert_eq!(printed, 18);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_change_of_rows_alone_prints_every_cell() {
|
||||
let printed = |ops: Vec<Op>| ops.iter().map(|op| if let Op::Print(s) = op { s.chars().count() } else { 0 }).sum::<usize>();
|
||||
assert_eq!(printed(diff(&Screen::new(4, 2), &Screen::new(4, 3))), 12);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue