Skip to content

Commit 7b16c7c

Browse files
committed
Add test for listing builtin aliases
Added a test that checks that the aliases that currently are builtin with cargo are indeed being printed with the rest of the commands when `cargo --list` is called. Closes #8486
1 parent 26beca0 commit 7b16c7c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/testsuite/cargo_command.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,17 @@ fn list_commands_with_descriptions() {
7878
.run();
7979
}
8080

81+
#[cargo_test]
82+
fn list_aliases_with_descriptions() {
83+
let p = project().build();
84+
p.cargo("--list")
85+
.with_stdout_contains(" b alias: build")
86+
.with_stdout_contains(" c alias: check")
87+
.with_stdout_contains(" r alias: run")
88+
.with_stdout_contains(" t alias: test")
89+
.run();
90+
}
91+
8192
#[cargo_test]
8293
fn list_command_looks_at_path() {
8394
let proj = project().build();

0 commit comments

Comments
 (0)