mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 11:07:42 +00:00
check RUST_BOOTSTRAP_CONFIG
in profile_user_dist
test
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
parent
5ad7454f75
commit
dfbbdda56e
@ -174,12 +174,14 @@ fn override_toml_duplicate() {
|
|||||||
#[test]
|
#[test]
|
||||||
fn profile_user_dist() {
|
fn profile_user_dist() {
|
||||||
fn get_toml(file: &Path) -> TomlConfig {
|
fn get_toml(file: &Path) -> TomlConfig {
|
||||||
let contents = if file.ends_with("config.toml") {
|
let contents =
|
||||||
"profile = \"user\"".to_owned()
|
if file.ends_with("config.toml") || env::var_os("RUST_BOOTSTRAP_CONFIG").is_some() {
|
||||||
} else {
|
"profile = \"user\"".to_owned()
|
||||||
assert!(file.ends_with("config.dist.toml"));
|
} else {
|
||||||
std::fs::read_to_string(file).unwrap()
|
assert!(file.ends_with("config.dist.toml"));
|
||||||
};
|
std::fs::read_to_string(file).unwrap()
|
||||||
|
};
|
||||||
|
|
||||||
toml::from_str(&contents)
|
toml::from_str(&contents)
|
||||||
.and_then(|table: toml::Value| TomlConfig::deserialize(table))
|
.and_then(|table: toml::Value| TomlConfig::deserialize(table))
|
||||||
.unwrap()
|
.unwrap()
|
||||||
|
Loading…
Reference in New Issue
Block a user