1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#[test]
fn display_panes() {
use crate::DisplayPanes;
use std::borrow::Cow;
// Display a visible indicator of each pane shown by `target-client`
//
// # Manual
//
// tmux ^3.2:
// ```text
// display-panes [-bN] [-d duration] [-t target-client] [template]
// (alias: displayp)
// ```
//
// tmux ^2.9:
// ```text
// display-panes [-b] [-d duration] [-t target-client] [template]
// (alias: displayp)
// ```
//
// tmux ^2.6:
// ```text
// display-panes [-d duration] [-t target-client] [template]
// (alias: displayp)
// ```
//
// tmux ^2.3:
// ```text
// display-panes [-t target-client] [template]
// (alias: displayp)
// ```
//
// tmux ^1.0:
// ```text
// display-panes [-t target-client]
// (alias: displayp)
// ```
let display_panes = DisplayPanes::new();
#[cfg(feature = "tmux_2_9")]
let display_panes = display_panes.not_block();
#[cfg(feature = "tmux_3_2")]
let display_panes = display_panes.ignore_keys();
#[cfg(feature = "tmux_2_6")]
let display_panes = display_panes.duration("1");
#[cfg(feature = "tmux_1_0")]
let display_panes = display_panes.target_client("2");
#[cfg(feature = "tmux_2_3")]
let display_panes = display_panes.template("3");
#[cfg(not(feature = "cmd_alias"))]
let cmd = "display-panes";
#[cfg(feature = "cmd_alias")]
let cmd = "displayp";
let mut s = Vec::new();
s.push(cmd);
#[cfg(feature = "tmux_2_9")]
s.push("-b");
#[cfg(feature = "tmux_3_2")]
s.push("-N");
#[cfg(feature = "tmux_2_6")]
s.extend_from_slice(&["-d", "1"]);
#[cfg(feature = "tmux_1_0")]
s.extend_from_slice(&["-t", "2"]);
#[cfg(feature = "tmux_2_3")]
s.push("3");
let s: Vec<Cow<str>> = s.into_iter().map(|a| a.into()).collect();
let display_panes = display_panes.build().to_vec();
assert_eq!(display_panes, s);
}