Skip to content

Commit

Permalink
cargo-insta: support --all-targets (#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamird authored Sep 22, 2023
1 parent 845ee36 commit 58a225f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cargo-insta/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ struct TestCommand {
/// Build artifacts with the specified profile
#[structopt(long)]
profile: Option<String>,
/// Test all targets (does not include doctests)
#[structopt(long)]
all_targets: bool,
/// Activate all available features
#[structopt(long)]
all_features: bool,
Expand Down Expand Up @@ -884,6 +887,9 @@ fn prepare_test_runner<'snapshot_ref>(
proc.arg("--profile");
proc.arg(profile);
}
if cmd.all_targets {
proc.arg("--all-targets");
}
if let Some(n) = cmd.jobs {
// use -j instead of --jobs since both nextest and cargo test use it
proc.arg("-j");
Expand Down

0 comments on commit 58a225f

Please sign in to comment.