Skip to content

Commit

Permalink
more cargo install usage adaptations in the same tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Apr 10, 2018
1 parent 6df5210 commit d8f7828
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/testsuite/required_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ fn install_default_features() {
assert_that(p.cargo("uninstall").arg("foo"), execs().with_status(0));

assert_that(
p.cargo("install").arg("--no-default-features"),
p.cargo("install --path .").arg("--no-default-features"),
execs().with_status(101).with_stderr(format!(
"\
[INSTALLING] foo v0.0.1 ([..])
Expand All @@ -758,12 +758,12 @@ fn install_default_features() {
);
assert_that(cargo_home(), is_not(has_installed_exe("foo")));

assert_that(p.cargo("install").arg("--bin=foo"), execs().with_status(0));
assert_that(p.cargo("install --path .").arg("--bin=foo"), execs().with_status(0));
assert_that(cargo_home(), has_installed_exe("foo"));
assert_that(p.cargo("uninstall").arg("foo"), execs().with_status(0));

assert_that(
p.cargo("install")
p.cargo("install --path .")
.arg("--bin=foo")
.arg("--no-default-features"),
execs().with_status(101).with_stderr(format!(
Expand All @@ -781,14 +781,14 @@ Consider enabling them by passing e.g. `--features=\"a\"`
assert_that(cargo_home(), is_not(has_installed_exe("foo")));

assert_that(
p.cargo("install").arg("--example=foo"),
p.cargo("install --path .").arg("--example=foo"),
execs().with_status(0),
);
assert_that(cargo_home(), has_installed_exe("foo"));
assert_that(p.cargo("uninstall").arg("foo"), execs().with_status(0));

assert_that(
p.cargo("install")
p.cargo("install --path .")
.arg("--example=foo")
.arg("--no-default-features"),
execs().with_status(101).with_stderr(format!(
Expand Down Expand Up @@ -874,15 +874,15 @@ fn install_multiple_required_features() {
assert_that(p.cargo("uninstall").arg("foo"), execs().with_status(0));

assert_that(
p.cargo("install").arg("--features").arg("c"),
p.cargo("install --path .").arg("--features").arg("c"),
execs().with_status(0),
);
assert_that(cargo_home(), has_installed_exe("foo_1"));
assert_that(cargo_home(), has_installed_exe("foo_2"));
assert_that(p.cargo("uninstall").arg("foo"), execs().with_status(0));

assert_that(
p.cargo("install").arg("--no-default-features"),
p.cargo("install --path .").arg("--no-default-features"),
execs().with_status(101).with_stderr(
"\
[INSTALLING] foo v0.0.1 ([..])
Expand Down

0 comments on commit d8f7828

Please sign in to comment.