test: fix tests for MacOS, closes #61

(I think) due to differences Backspace/Delete is handled in MacOS as compared to Linux/Windows, some tests were failing.
`oxker` default keymap doesn’t use Backspace or Delete, but a note has been added to the function in case it ever comes up again in the future.
This commit is contained in:
Jack Wills
2025-04-22 15:03:24 +00:00
parent e158522fd0
commit cfc2decd8d
5 changed files with 13 additions and 10 deletions
+4 -4
View File
@@ -581,7 +581,7 @@ mod tests {
sort_by_id: (KeyCode::Char('/'), None),
sort_by_image: (KeyCode::Char(','), None),
sort_by_rx: (KeyCode::Char('.'), None),
sort_by_tx: (KeyCode::Backspace, None),
sort_by_tx: (KeyCode::Insert, None),
sort_reset: (KeyCode::Up, None),
toggle_help: (KeyCode::Home, None),
toggle_mouse_capture: (KeyCode::PageDown, None),
@@ -626,9 +626,9 @@ mod tests {
sort_by_id: (KeyCode::Char('/'), Some(KeyCode::Char('='))),
sort_by_image: (KeyCode::Char(','), Some(KeyCode::Char('\\'))),
sort_by_rx: (KeyCode::Char('.'), Some(KeyCode::Char(']'))),
sort_by_tx: (KeyCode::Backspace, Some(KeyCode::BackTab)),
sort_by_tx: (KeyCode::Insert, Some(KeyCode::BackTab)),
sort_reset: (KeyCode::Up, Some(KeyCode::Down)),
toggle_help: (KeyCode::Home, Some(KeyCode::Delete)),
toggle_help: (KeyCode::Home, Some(KeyCode::End)),
toggle_mouse_capture: (KeyCode::PageDown, Some(KeyCode::PageUp)),
};
@@ -671,7 +671,7 @@ mod tests {
sort_by_id: (KeyCode::Char('/'), Some(KeyCode::Char('='))),
sort_by_image: (KeyCode::Char(','), None),
sort_by_rx: (KeyCode::Char('.'), Some(KeyCode::Char(']'))),
sort_by_tx: (KeyCode::Backspace, None),
sort_by_tx: (KeyCode::Insert, None),
sort_reset: (KeyCode::Up, Some(KeyCode::Down)),
toggle_help: (KeyCode::Home, None),
toggle_mouse_capture: (KeyCode::PageDown, Some(KeyCode::PageUp)),