#[test]
fn swap_window() {
use crate::SwapWindow;
use std::borrow::Cow;
let swap_window = SwapWindow::new();
#[cfg(feature = "tmux_0_8")]
let swap_window = swap_window.detached();
#[cfg(feature = "tmux_0_8")]
let swap_window = swap_window.src_window("1");
#[cfg(feature = "tmux_0_8")]
let swap_window = swap_window.dst_window("2");
#[cfg(not(feature = "cmd_alias"))]
let cmd = "swap-window";
#[cfg(feature = "cmd_alias")]
let cmd = "swapw";
let mut v = Vec::new();
v.push(cmd);
#[cfg(feature = "tmux_0_8")]
v.push("-d");
#[cfg(feature = "tmux_0_8")]
v.extend_from_slice(&["-s", "1"]);
#[cfg(feature = "tmux_0_8")]
v.extend_from_slice(&["-t", "2"]);
let v: Vec<Cow<str>> = v.into_iter().map(|a| a.into()).collect();
let swap_window = swap_window.build().to_vec();
assert_eq!(swap_window, v);
}