in src/components/splitting.rs [388:414]
fn test_adaptive() {
let splitter = make_splitter(SplitKind::Adaptive, Direction::Vertical);
let top = vec![
vec!["Line 1"].try_into().unwrap(),
vec!["Line 2222"].try_into().unwrap(),
];
let mut bottom = vec![
vec!["Line 11"].try_into().unwrap(),
vec!["Line 12"].try_into().unwrap(),
vec!["Last line just kiddi"].try_into().unwrap(),
];
let msg1 = Echo1(top.clone());
let msg2 = Echo2(bottom.clone());
let mut output = top;
output.append(&mut bottom);
let drawn = splitter
.draw(
&crate::state!(&msg1, &msg2),
Dimensions::new(20, 20),
DrawMode::Normal,
)
.unwrap();
assert_eq!(drawn, output);
}