#[test]
fn respawn_window() {
use crate::{RespawnWindow, TargetWindow};
use std::borrow::Cow;
let target_window = TargetWindow::Raw("3").to_string();
let respawn_window = RespawnWindow::new();
#[cfg(feature = "tmux_0_8")]
let respawn_window = respawn_window.kill();
#[cfg(feature = "tmux_2_6")]
let respawn_window = respawn_window.start_directory("1");
#[cfg(feature = "tmux_3_0")]
let respawn_window = respawn_window.environment("2");
#[cfg(feature = "tmux_0_9")]
let respawn_window = respawn_window.target_window(&target_window);
#[cfg(feature = "tmux_1_2")]
let respawn_window = respawn_window.shell_command("4");
#[cfg(not(feature = "cmd_alias"))]
let cmd = "respawn-window";
#[cfg(feature = "cmd_alias")]
let cmd = "respawnw";
let mut s = Vec::new();
s.push(cmd);
#[cfg(feature = "tmux_0_8")]
s.push("-k");
#[cfg(feature = "tmux_2_6")]
s.extend_from_slice(&["-c", "1"]);
#[cfg(feature = "tmux_3_0")]
s.extend_from_slice(&["-e", "2"]);
#[cfg(feature = "tmux_0_9")]
s.extend_from_slice(&["-t", "3"]);
#[cfg(feature = "tmux_1_2")]
s.push("4");
let s: Vec<Cow<str>> = s.into_iter().map(|a| a.into()).collect();
let respawn_window = respawn_window.build().to_vec();
assert_eq!(respawn_window, s);
}