Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
7 changes: 5 additions & 2 deletions rust/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,14 @@ use std::sync::mpsc::Receiver;

/// Automated driver management for Selenium
#[derive(Parser, Debug)]
#[clap(version, about, long_about = None, help_template = "\
#[clap(version, about, long_about = None, after_help = "\
License: https://github.com/SeleniumHQ/selenium/blob/trunk/LICENSE
Notices: https://github.com/SeleniumHQ/selenium/blob/trunk/NOTICE", help_template = "\
{name} {version}
{about-with-newline}
{usage-heading} {usage}
{all-args}")]
{all-args}
{after-help}")]
struct Cli {
/// Browser name (chrome, firefox, edge, iexplorer, safari, safaritp, webview2, or electron)
#[clap(long, value_parser)]
Expand Down
10 changes: 10 additions & 0 deletions rust/tests/output_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ use std::path::Path;

mod common;

#[test]
fn help_output_includes_license_and_notice_links() {
let mut cmd = get_selenium_manager();
cmd.arg("--help").assert().success().code(0);

let stdout = get_stdout(&mut cmd);
assert!(stdout.contains("https://github.com/SeleniumHQ/selenium/blob/trunk/LICENSE"));
assert!(stdout.contains("https://github.com/SeleniumHQ/selenium/blob/trunk/NOTICE"));
}

#[test]
fn json_output_test() {
let mut cmd = get_selenium_manager();
Expand Down