From 7b16c7c1305de3551d1d5cdc4dc2bf13861d9685 Mon Sep 17 00:00:00 2001 From: CPerezz Date: Fri, 24 Jul 2020 23:40:49 +0200 Subject: [PATCH] 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 --- tests/testsuite/cargo_command.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/testsuite/cargo_command.rs b/tests/testsuite/cargo_command.rs index fa4e05a74d2..667c2933886 100644 --- a/tests/testsuite/cargo_command.rs +++ b/tests/testsuite/cargo_command.rs @@ -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();