Skip to content

Commit

Permalink
test(cli): ensure the resolution of #3737
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l committed Mar 27, 2024
1 parent ba6b5d0 commit bcdcad2
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/suite/cli_misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,30 @@ info: toolchain 'test' uninstalled
});
}

// issue #3737
#[test]
#[cfg(any(unix, windows))]
fn toolchain_symlink() {
use rustup::utils::raw::symlink_dir;
use std::fs;

clitools::test(Scenario::SimpleV2, &|config| {
let cwd = config.current_dir();
let test_rustupdir = cwd.join("rustup-test");
let test_toolchains = test_rustupdir.join("toolchains");
fs::create_dir_all(&test_toolchains).unwrap();
symlink_dir(&config.rustupdir.join("toolchains"), &test_toolchains).unwrap();

let out = config.run(
"rustup",
["toolchain", "list"],
&[("RUSTUP_HOME", test_rustupdir.to_str().unwrap())],
);
assert!(out.ok);
assert!(out.stdout.contains("stable\n"));
});
}

// issue #1297
#[test]
fn update_unavailable_rustc() {
Expand Down

0 comments on commit bcdcad2

Please sign in to comment.