Skip to content

Commit

Permalink
Add test for listing builtin aliases
Browse files Browse the repository at this point in the history
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
  • Loading branch information
CPerezz committed Jul 24, 2020
1 parent 26beca0 commit 7b16c7c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/testsuite/cargo_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,17 @@ fn list_commands_with_descriptions() {
.run();
}

#[cargo_test]
fn list_aliases_with_descriptions() {
let p = project().build();
p.cargo("--list")
.with_stdout_contains(" b alias: build")
.with_stdout_contains(" c alias: check")
.with_stdout_contains(" r alias: run")
.with_stdout_contains(" t alias: test")
.run();
}

#[cargo_test]
fn list_command_looks_at_path() {
let proj = project().build();
Expand Down

0 comments on commit 7b16c7c

Please sign in to comment.