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
74
75
76
77
78
79
80
81
82
83
84
85
// auto-generated file
//
// 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.5:
// ```text
// display-panes [-t target-client]
// (alias: displayp)
// ```
#[test]
fn display_panes() {
use crate::DisplayPanes;
use std::borrow::Cow;
let display_panes = DisplayPanes::new();
// `[-b]`
#[cfg(feature = "tmux_2_9")]
let display_panes = display_panes.not_block();
// `[-N]`
#[cfg(feature = "tmux_3_2")]
let display_panes = display_panes.ignore_keys();
// `[-d duration]`
#[cfg(feature = "tmux_2_6")]
let display_panes = display_panes.duration("1");
// `[-t target-client]`
#[cfg(feature = "tmux_1_5")]
let display_panes = display_panes.target_client("2");
// `[template]`
#[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 v = Vec::new();
v.push(cmd);
#[cfg(feature = "tmux_2_9")]
v.push("-b");
#[cfg(feature = "tmux_3_2")]
v.push("-N");
#[cfg(feature = "tmux_2_6")]
v.extend_from_slice(&["-d", "1"]);
#[cfg(feature = "tmux_1_5")]
v.extend_from_slice(&["-t", "2"]);
#[cfg(feature = "tmux_2_3")]
v.push("3");
let v: Vec<Cow<str>> = v.into_iter().map(|a| a.into()).collect();
let display_panes = display_panes.build().to_vec();
assert_eq!(display_panes, v);
}