test: loop over aliases to asser -Zhelp output

This commit is contained in:
Weihang Lo 2024-01-08 20:59:23 -05:00
parent 59cfee16f3
commit dbfe4277d3
No known key found for this signature in database
GPG Key ID: D7DBF189825E82E7

View File

@ -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();
}
}