Skip to content

Commit

Permalink
test add/rm multiple targets
Browse files Browse the repository at this point in the history
  • Loading branch information
durka committed Mar 29, 2017
1 parent 311ead0 commit d5fa628
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/cli-rustup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,32 @@ fn remove_target() {
});
}

#[test]
fn add_remove_multiple_targets() {
setup(&|config| {
expect_ok(config, &["rustup", "default", "nightly"]);
expect_ok(config, &["rustup", "target", "add",
clitools::CROSS_ARCH1,
clitools::CROSS_ARCH2]);
let path = format!("toolchains/nightly-{}/lib/rustlib/{}/lib/libstd.rlib",
&this_host_triple(), clitools::CROSS_ARCH1);
assert!(config.rustupdir.join(path).exists());
let path = format!("toolchains/nightly-{}/lib/rustlib/{}/lib/libstd.rlib",
&this_host_triple(), clitools::CROSS_ARCH2);
assert!(config.rustupdir.join(path).exists());

expect_ok(config, &["rustup", "target", "remove",
clitools::CROSS_ARCH1,
clitools::CROSS_ARCH2]);
let path = format!("toolchains/nightly-{}/lib/rustlib/{}/lib/libstd.rlib",
&this_host_triple(), clitools::CROSS_ARCH1);
assert!(!config.rustupdir.join(path).exists());
let path = format!("toolchains/nightly-{}/lib/rustlib/{}/lib/libstd.rlib",
&this_host_triple(), clitools::CROSS_ARCH2);
assert!(!config.rustupdir.join(path).exists());
});
}

#[test]
fn list_targets() {
setup(&|config| {
Expand Down

0 comments on commit d5fa628

Please sign in to comment.