Skip to content

Commit 5544814

Browse files
committed
test: Make it the default behavior
1 parent 9780f8c commit 5544814

File tree

2 files changed

+5
-35
lines changed

2 files changed

+5
-35
lines changed

tests/testsuite/concurrent.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,8 @@ fn one_install_should_be_bad() {
105105
} else {
106106
(b, a)
107107
};
108-
execs()
109-
.with_status(101)
110-
.with_stderr_contains(
111-
"[ERROR] binary `foo[..]` already exists in destination as part of `[..]`",
112-
)
113-
.run_output(&bad);
114-
execs()
115-
.with_stderr_contains("warning: be sure to add `[..]` to your PATH [..]")
116-
.run_output(&good);
108+
execs().run_output(&bad);
109+
execs().run_output(&good);
117110

118111
assert_has_installed_exe(cargo_home(), "foo");
119112
}

tests/testsuite/install.rs

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,10 @@ fn install_path() {
247247
cargo_process("install --path").arg(p.root()).run();
248248
assert_has_installed_exe(cargo_home(), "foo");
249249
p.cargo("install --path .")
250-
.with_status(101)
251250
.with_stderr(
252251
"\
253252
[INSTALLING] foo v0.0.1 [..]
254-
[ERROR] binary `foo[..]` already exists in destination as part of `foo v0.0.1 [..]`
253+
binary `foo[..]` already exists in destination as part of `foo v0.0.1 [..]`
255254
Add --force to overwrite
256255
",
257256
)
@@ -456,28 +455,6 @@ fn install_twice() {
456455

457456
cargo_process("install --path").arg(p.root()).run();
458457
cargo_process("install --path")
459-
.arg(p.root())
460-
.with_status(101)
461-
.with_stderr(
462-
"\
463-
[INSTALLING] foo v0.0.1 [..]
464-
[ERROR] binary `foo-bin1[..]` already exists in destination as part of `foo v0.0.1 ([..])`
465-
binary `foo-bin2[..]` already exists in destination as part of `foo v0.0.1 ([..])`
466-
Add --force to overwrite
467-
",
468-
)
469-
.run();
470-
}
471-
472-
#[test]
473-
fn install_ensure() {
474-
let p = project()
475-
.file("src/bin/foo-bin1.rs", "fn main() {}")
476-
.file("src/bin/foo-bin2.rs", "fn main() {}")
477-
.build();
478-
479-
cargo_process("install --ensure --path").arg(p.root()).run();
480-
cargo_process("install --ensure --path")
481458
.arg(p.root())
482459
.with_stderr(
483460
"\
@@ -491,7 +468,7 @@ Add --force to overwrite
491468
}
492469

493470
#[test]
494-
fn install_ensure_force() {
471+
fn install_version_update() {
495472
let p = project()
496473
.at("foo1")
497474
.file("Cargo.toml", &basic_manifest("foo", "0.1.0"))
@@ -514,7 +491,7 @@ foo v0.1.0 ([..]):
514491
.file("src/main.rs", "fn main() {}")
515492
.build();
516493

517-
cargo_process("install --ensure --path").arg(p.root()).run();
494+
cargo_process("install --path").arg(p.root()).run();
518495
cargo_process("install --list")
519496
.with_stdout(
520497
"\

0 commit comments

Comments
 (0)