Skip to content

Commit

Permalink
Merge pull request #238 from crepererum-oss/crepererum/test_help_cmd
Browse files Browse the repository at this point in the history
test: ensure `help` works both as arg and as cmd
  • Loading branch information
crepererum authored Jul 31, 2024
2 parents 88cb1f3 + 1fd0593 commit eeca53f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@ use assert_cmd::Command;
use tempfile::TempDir;

#[test]
fn test_help() {
fn test_help_arg() {
let mut cmd = cmd();
cmd.arg("--help").assert().success();
}

#[test]
fn test_help_cmd() {
let mut cmd = cmd();
cmd.arg("help").assert().success();
}

fn cmd() -> Command {
Command::cargo_bin(env!("CARGO_PKG_NAME")).unwrap()
}
Expand Down

0 comments on commit eeca53f

Please sign in to comment.