#[test]
fn previous_window() {
use crate::PreviousWindow;
use std::borrow::Cow;
let previous_window = PreviousWindow::new();
#[cfg(feature = "tmux_1_5")]
let previous_window = previous_window.parent_sighup();
#[cfg(feature = "tmux_0_8")]
let previous_window = previous_window.target_session("1");
#[cfg(not(feature = "cmd_alias"))]
let cmd = "previous-window";
#[cfg(feature = "cmd_alias")]
let cmd = "prev";
let mut v = Vec::new();
v.push(cmd);
#[cfg(feature = "tmux_1_5")]
v.push("-a");
#[cfg(feature = "tmux_0_8")]
v.extend_from_slice(&["-t", "1"]);
let v: Vec<Cow<str>> = v.into_iter().map(|a| a.into()).collect();
let previous_window = previous_window.build().to_vec();
assert_eq!(previous_window, v);
}