Lines
100 %
Functions
Branches
use super::*;
static PANES: &[PaneId] = &[PaneId::Prompt, PaneId::Scrollback];
fn pane_set() -> PaneSet {
PaneSet::new(PANES, PaneId::Prompt)
}
#[test]
fn initial_focus_is_prompt() {
let ps = pane_set();
assert_eq!(ps.focused(), PaneId::Prompt);
assert!(ps.is_focused(PaneId::Prompt));
assert!(!ps.is_focused(PaneId::Scrollback));
fn focus_moves_to_member() {
let mut ps = pane_set();
ps.focus(PaneId::Scrollback);
assert!(ps.is_focused(PaneId::Scrollback));
fn focus_on_non_member_is_noop() {
static PROMPT_ONLY: &[PaneId] = &[PaneId::Prompt];
let mut ps = PaneSet::new(PROMPT_ONLY, PaneId::Prompt);
fn cycle_forward_wraps() {
ps.cycle(true);
fn cycle_backward_wraps() {
ps.cycle(false);
fn cycle_forward_then_backward_returns_to_start() {