Skip to content

Commit dbfe427

Browse files
committed
test: loop over aliases to asser -Zhelp output
1 parent 59cfee1 commit dbfe427

File tree

1 file changed

+7
-47
lines changed

1 file changed

+7
-47
lines changed

tests/testsuite/help.rs

Lines changed: 7 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -158,51 +158,11 @@ fn help_alias() {
158158

159159
#[cargo_test]
160160
fn alias_z_flag_help() {
161-
cargo_process("build -Z help")
162-
.with_stdout_contains(
163-
" -Z allow-features[..] Allow *only* the listed unstable features",
164-
)
165-
.run();
166-
167-
cargo_process("run -Z help")
168-
.with_stdout_contains(
169-
" -Z allow-features[..] Allow *only* the listed unstable features",
170-
)
171-
.run();
172-
173-
cargo_process("check -Z help")
174-
.with_stdout_contains(
175-
" -Z allow-features[..] Allow *only* the listed unstable features",
176-
)
177-
.run();
178-
179-
cargo_process("test -Z help")
180-
.with_stdout_contains(
181-
" -Z allow-features[..] Allow *only* the listed unstable features",
182-
)
183-
.run();
184-
185-
cargo_process("b -Z help")
186-
.with_stdout_contains(
187-
" -Z allow-features[..] Allow *only* the listed unstable features",
188-
)
189-
.run();
190-
191-
cargo_process("r -Z help")
192-
.with_stdout_contains(
193-
" -Z allow-features[..] Allow *only* the listed unstable features",
194-
)
195-
.run();
196-
197-
cargo_process("c -Z help")
198-
.with_stdout_contains(
199-
" -Z allow-features[..] Allow *only* the listed unstable features",
200-
)
201-
.run();
202-
203-
cargo_process("t -Z help")
204-
.with_stdout_contains(
205-
" -Z allow-features[..] Allow *only* the listed unstable features",
206-
)
207-
.run();
161+
for cmd in ["build", "run", "check", "test", "b", "r", "c", "t"] {
162+
cargo_process(&format!("{cmd} -Z help"))
163+
.with_stdout_contains(
164+
" -Z allow-features[..] Allow *only* the listed unstable features",
165+
)
166+
.run();
167+
}
208168
}

0 commit comments

Comments
 (0)