#[test]
fn set_hook() {
use crate::SetHook;
use std::borrow::Cow;
let set_hook = SetHook::new();
#[cfg(feature = "tmux_3_0")]
let set_hook = set_hook.append();
#[cfg(feature = "tmux_2_2")]
let set_hook = set_hook.global();
#[cfg(feature = "tmux_3_2")]
let set_hook = set_hook.pane();
#[cfg(feature = "tmux_2_8")]
let set_hook = set_hook.run();
#[cfg(feature = "tmux_2_4")]
let set_hook = set_hook.unset();
#[cfg(feature = "tmux_3_2")]
let set_hook = set_hook.window();
#[cfg(feature = "tmux_2_2")]
let set_hook = set_hook.target_session("1");
#[cfg(feature = "tmux_2_2")]
let set_hook = set_hook.hook_name("2");
#[cfg(feature = "tmux_2_2")]
let set_hook = set_hook.command("3");
let cmd = "set-hook";
let mut v = Vec::new();
v.push(cmd);
#[cfg(feature = "tmux_3_0")]
v.push("-a");
#[cfg(feature = "tmux_2_2")]
v.push("-g");
#[cfg(feature = "tmux_3_2")]
v.push("-p");
#[cfg(feature = "tmux_2_8")]
v.push("-R");
#[cfg(feature = "tmux_2_4")]
v.push("-u");
#[cfg(feature = "tmux_3_2")]
v.push("-w");
#[cfg(feature = "tmux_2_2")]
v.extend_from_slice(&["-t", "1"]);
#[cfg(feature = "tmux_2_2")]
v.push("2");
#[cfg(feature = "tmux_2_2")]
v.push("3");
let v: Vec<Cow<str>> = v.into_iter().map(|a| a.into()).collect();
let set_hook = set_hook.build().to_vec();
assert_eq!(set_hook, v);
}