Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/demo.cast
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[0.0,"o","--h"]
[0.15,"i","elp\r"]
[0.0,"o","elp\r\n"]
[0.25,"o","A Bluetooth headset intercom for Linux\r\n\r\nUsage: bt-intercom [OPTIONS] <COMMAND>\r\n\r\nCommands:\r\n scan Scan for nearby Bluetooth devices\r\n pair Pair, trust, and connect a headset\r\n remove Remove a headset from the saved intercom network\r\n status Show Bluetooth headset audio status\r\n run Route configured headset microphones to one another\r\n completions Generate shell completion definitions\r\n panel Open the interactive terminal control panel\r\n help Print this message or the help of the given subcommand(s)\r\n\r\nOptions:\r\n --verbose Enable detailed diagnostics on stderr (unless RUST_LOG is set)\r\n -V, --version \r\n -h, --help Print help\r\n"]
[0.25,"o","A Bluetooth headset intercom for Linux\r\n\r\nUsage: bt-intercom [OPTIONS] <COMMAND>\r\n\r\nCommands:\r\n scan Scan for nearby Bluetooth devices\r\n pair Pair, trust, and connect a headset\r\n remove Remove a headset from the saved intercom network\r\n status Show Bluetooth headset audio status\r\n run Route configured headset microphones to one another, optionally showing the live dashboard\r\n completions Generate shell completion definitions\r\n panel Open the interactive terminal control panel\r\n help Print this message or the help of the given subcommand(s)\r\n\r\nOptions:\r\n --verbose Enable detailed diagnostics on stderr (unless RUST_LOG is set)\r\n -V, --version \r\n -h, --help Print help\r\n"]
[0.5,"o","$ "]
[0.15,"i","bt-"]
[0.0,"o","bt-"]
Expand Down
9 changes: 8 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ enum CliCommand {
#[arg(required = true, value_parser = address)]
addresses: Vec<String>,
},
/// Route configured headset microphones to one another.
/// Route configured headset microphones to one another, optionally showing the live dashboard.
Run {
#[arg(value_parser = address)]
addresses: Vec<String>,
Expand Down Expand Up @@ -1221,6 +1221,13 @@ mod tests {
assert!(short.contains(env!("BT_INTERCOM_BUILD_DATETIME")));
}

#[test]
fn top_level_help_mentions_dashboard_and_control_panel() {
let help = cli_command().render_help().to_string();
assert!(help.contains("dashboard"));
assert!(help.contains("control panel"));
}

#[test]
fn parses_ptt_without_changing_default_mode() {
let address = "AA:BB:CC:DD:EE:01".to_string();
Expand Down