Skip to content

Commit f3b444b

Browse files
committed
add test for update partial target triple
1 parent 48aac03 commit f3b444b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/cli-rustup.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2147,6 +2147,31 @@ warning: If you meant to build software to target that platform, perhaps try `ru
21472147
});
21482148
}
21492149

2150+
#[test]
2151+
fn dont_warn_on_partial_build() {
2152+
setup(&|config| {
2153+
let triple = this_host_triple();
2154+
let arch = triple.split('-').next().unwrap();
2155+
let mut cmd = clitools::cmd(
2156+
config,
2157+
"rustup",
2158+
&["toolchain", "install", &format!("nightly-{}", arch)],
2159+
);
2160+
clitools::env(config, &mut cmd);
2161+
let out = cmd.output().unwrap();
2162+
assert!(out.status.success());
2163+
let stderr = String::from_utf8(out.stderr).unwrap();
2164+
assert!(stderr.contains(&format!(
2165+
r"info: syncing channel updates for 'nightly-{0}'",
2166+
triple
2167+
)));
2168+
assert!(!stderr.contains(&format!(
2169+
r"warning: toolchain 'nightly-{0}' may not be able to run on this system.",
2170+
arch
2171+
)));
2172+
})
2173+
}
2174+
21502175
/// Checks that `rust-toolchain.toml` files are considered
21512176
#[test]
21522177
fn rust_toolchain_toml() {

0 commit comments

Comments
 (0)