#[test]
fn find_window() {
use crate::{FindWindow, TargetPane};
use std::borrow::Cow;
let target_pane = TargetPane::Raw("1").to_string();
let find_window = FindWindow::new();
#[cfg(feature = "tmux_3_0")]
let find_window = find_window.regex();
#[cfg(feature = "tmux_1_7")]
let find_window = find_window.only_visible();
#[cfg(feature = "tmux_1_7")]
let find_window = find_window.only_name();
#[cfg(feature = "tmux_1_7")]
let find_window = find_window.only_title();
#[cfg(feature = "tmux_3_0")]
let find_window = find_window.zoom();
#[cfg(feature = "tmux_0_8")]
let find_window = find_window.target_pane(&target_pane);
#[cfg(not(feature = "cmd_alias"))]
let cmd = "find-window";
#[cfg(feature = "cmd_alias")]
let cmd = "findw";
let mut s = Vec::new();
s.push(cmd);
#[cfg(feature = "tmux_3_0")]
s.push("-r");
#[cfg(feature = "tmux_1_7")]
s.push("-C");
#[cfg(feature = "tmux_1_7")]
s.push("-N");
#[cfg(feature = "tmux_1_7")]
s.push("-T");
#[cfg(feature = "tmux_3_0")]
s.push("-Z");
#[cfg(feature = "tmux_0_8")]
s.extend_from_slice(&["-t", "1"]);
let s: Vec<Cow<str>> = s.into_iter().map(|a| a.into()).collect();
let find_window = find_window.build().to_vec();
assert_eq!(find_window, s);
}