Tweaked the key mappings so that it is now easier to change key mappings and update the corresponding UI elements as well

This commit is contained in:
Dark-Alex-17 committed 2023-08-08 10:50:07 -06:00
1 parent 74011b9ab3
commit 5602fc4341
16 files changed
+469 -206

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
#[cfg(test)]
mod test {
use crate::app::key_binding::{build_keymapping_string, DEFAULT_KEYBINDINGS};
use pretty_assertions::assert_str_eq;
#[test]
fn test_build_keymapping_string() {
let test_keys_array = [
(DEFAULT_KEYBINDINGS.add, "add"),
(DEFAULT_KEYBINDINGS.delete, "delete"),
];
assert_str_eq!(
build_keymapping_string(&test_keys_array),
"<a> add | <del> delete"
);
}
}