mirror of https://github.com/sayanarijit/xplr
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
364 B
Rust
17 lines
364 B
Rust
use xplr::*;
|
|
|
|
#[test]
|
|
fn test_key_down() {
|
|
let mut app = app::create().expect("failed to create app");
|
|
|
|
assert_eq!(app.directory_buffer.focus, Some(0));
|
|
|
|
let actions = app.actions_from_key(&input::Key::Down).unwrap();
|
|
|
|
for action in actions {
|
|
app = app.handle(&action).unwrap()
|
|
}
|
|
|
|
assert_eq!(app.directory_buffer.focus, Some(1));
|
|
}
|