tests: test_draw_blocks_help() with esc text

This commit is contained in:
Jack Wills
2024-05-07 18:14:09 +00:00
parent 27d72c547e
commit ff839af4ef
+3 -3
View File
@@ -2459,7 +2459,7 @@ mod tests {
/// This will cause issues once the version has more than the current 5 chars (0.5.0) /// This will cause issues once the version has more than the current 5 chars (0.5.0)
// Help popup is drawn correctly // Help popup is drawn correctly
fn test_draw_blocks_help() { fn test_draw_blocks_help() {
let (w, h) = (87, 30); let (w, h) = (87, 32);
let mut setup = test_setup(w, h, true, true); let mut setup = test_setup(w, h, true, true);
setup setup
@@ -2468,7 +2468,6 @@ mod tests {
super::help_box(f); super::help_box(f);
}) })
.unwrap(); .unwrap();
let expected = [ let expected = [
" ".to_owned(), " ".to_owned(),
format!("{VERSION} ────────────────────────────────────────────────────────────────────────────╮ "), format!("{VERSION} ────────────────────────────────────────────────────────────────────────────╮ "),
@@ -2493,13 +2492,14 @@ mod tests {
" │ ( m ) toggle mouse capture - if disabled, text on screen can be selected & copied │ ".to_owned(), " │ ( m ) toggle mouse capture - if disabled, text on screen can be selected & copied │ ".to_owned(),
" │ ( 0 ) stop sort │ ".to_owned(), " │ ( 0 ) stop sort │ ".to_owned(),
" │ ( 1 - 9 ) sort by header - or click header │ ".to_owned(), " │ ( 1 - 9 ) sort by header - or click header │ ".to_owned(),
" │ ( esc ) close dialog │ ".to_owned(),
" │ ( q ) quit at any time │ ".to_owned(), " │ ( q ) quit at any time │ ".to_owned(),
" │ │ ".to_owned(), " │ │ ".to_owned(),
" │ currently an early work in progress, all and any input appreciated │ ".to_owned(), " │ currently an early work in progress, all and any input appreciated │ ".to_owned(),
" │ https://github.com/mrjackwills/oxker │ ".to_owned(), " │ https://github.com/mrjackwills/oxker │ ".to_owned(),
" │ │ ".to_owned(), " │ │ ".to_owned(),
" │ │ ".to_owned(),
" ╰───────────────────────────────────────────────────────────────────────────────────╯ ".to_owned(), " ╰───────────────────────────────────────────────────────────────────────────────────╯ ".to_owned(),
" ".to_owned(),
]; ];
for (row_index, row) in expected.iter().enumerate() { for (row_index, row) in expected.iter().enumerate() {