Skip to content

Commit f86ec54

Browse files
epagerami3l
authored andcommitted
test(toolchain): Show list's behavior
1 parent aecdee4 commit f86ec54

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

tests/suite/cli_rustup_ui.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,32 @@ fn rustup_toolchain_cmd_link_cmd_help_flag() {
405405
);
406406
}
407407

408+
#[tokio::test]
409+
async fn rustup_toolchain_list() {
410+
let name = "rustup_toolchain_list";
411+
let cx = CliTestContext::new(Scenario::ArchivesV2).await;
412+
cx.config
413+
.expect(["rustup", "update", "nightly"])
414+
.await
415+
.is_ok();
416+
cx.config
417+
.expect(["rustup", "update", "beta-2015-01-01"])
418+
.await
419+
.is_ok();
420+
cx.config
421+
.expect_with_env(
422+
["rustup", "toolchain", "list"],
423+
[("RUSTUP_TERM_COLOR", "always")],
424+
)
425+
.await
426+
.with_stdout(Data::read_from(
427+
Path::new(&format!("tests/suite/cli_rustup_ui/{name}.stdout.term.svg")),
428+
None,
429+
))
430+
.with_stderr("")
431+
.is_ok();
432+
}
433+
408434
#[test]
409435
fn rustup_toolchain_cmd_list_cmd_help_flag() {
410436
test_help(
Lines changed: 27 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)