diff --git a/local/recipes/tui/tlc/source/src/viewer/mod.rs b/local/recipes/tui/tlc/source/src/viewer/mod.rs index 4d9d96606b..eaf476bc7e 100644 --- a/local/recipes/tui/tlc/source/src/viewer/mod.rs +++ b/local/recipes/tui/tlc/source/src/viewer/mod.rs @@ -1987,6 +1987,18 @@ mod tests { assert!(!v.show_help); } + #[test] + fn hex_navigation_tab_toggles() { + let p = make_hex_file("nav.bin", &[0x01, 0x02]); + let mut v = Viewer::open(&p).unwrap(); + v.mode = ViewMode::Hex; + assert!(!v.hexview_in_text); + v.handle_key(Key::TAB); + assert!(v.hexview_in_text); + v.handle_key(Key::TAB); + assert!(!v.hexview_in_text); + } + fn k(c: char) -> Key { Key { code: c as u32, mods: crate::key::Modifiers::empty() } }