Skip to content

Commit

Permalink
test: loop over aliases to asser -Zhelp output
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Jan 9, 2024
1 parent 59cfee1 commit dbfe427
Showing 1 changed file with 7 additions and 47 deletions.
54 changes: 7 additions & 47 deletions tests/testsuite/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,51 +158,11 @@ fn help_alias() {

#[cargo_test]
fn alias_z_flag_help() {
cargo_process("build -Z help")
.with_stdout_contains(
" -Z allow-features[..] Allow *only* the listed unstable features",
)
.run();

cargo_process("run -Z help")
.with_stdout_contains(
" -Z allow-features[..] Allow *only* the listed unstable features",
)
.run();

cargo_process("check -Z help")
.with_stdout_contains(
" -Z allow-features[..] Allow *only* the listed unstable features",
)
.run();

cargo_process("test -Z help")
.with_stdout_contains(
" -Z allow-features[..] Allow *only* the listed unstable features",
)
.run();

cargo_process("b -Z help")
.with_stdout_contains(
" -Z allow-features[..] Allow *only* the listed unstable features",
)
.run();

cargo_process("r -Z help")
.with_stdout_contains(
" -Z allow-features[..] Allow *only* the listed unstable features",
)
.run();

cargo_process("c -Z help")
.with_stdout_contains(
" -Z allow-features[..] Allow *only* the listed unstable features",
)
.run();

cargo_process("t -Z help")
.with_stdout_contains(
" -Z allow-features[..] Allow *only* the listed unstable features",
)
.run();
for cmd in ["build", "run", "check", "test", "b", "r", "c", "t"] {
cargo_process(&format!("{cmd} -Z help"))
.with_stdout_contains(
" -Z allow-features[..] Allow *only* the listed unstable features",
)
.run();
}
}

0 comments on commit dbfe427

Please sign in to comment.