Skip to content

Commit

Permalink
Add integration tests verifying running each binary with --help works
Browse files Browse the repository at this point in the history
  • Loading branch information
wykurz committed Dec 27, 2023
1 parent 8753989 commit 8496971
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 2 deletions.
119 changes: 117 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ members = [
"rcp",
"rlink",
"rrm",
"tests",
]

[profile.dev]
Expand Down
11 changes: 11 additions & 0 deletions tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "tests"
version = "0.3.0"
edition = "2021"

[dev-dependencies]
assert_cmd = "2"

[[test]]
name = "tests"
path = "tests.rs"
23 changes: 23 additions & 0 deletions tests/tests.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#[test]
fn check_filegen_help() {
let mut cmd = assert_cmd::Command::cargo_bin("filegen").unwrap();
cmd.arg("--help").assert();
}

#[test]
fn check_rcp_help() {
let mut cmd = assert_cmd::Command::cargo_bin("rcp").unwrap();
cmd.arg("--help").assert();
}

#[test]
fn check_rlink_help() {
let mut cmd = assert_cmd::Command::cargo_bin("rlink").unwrap();
cmd.arg("--help").assert();
}

#[test]
fn check_rrm_help() {
let mut cmd = assert_cmd::Command::cargo_bin("rrm").unwrap();
cmd.arg("--help").assert();
}

0 comments on commit 8496971

Please sign in to comment.