Skip to content

Commit 4da3d37

Browse files
committed
test: add test for install without dry-run option
1 parent 631b877 commit 4da3d37

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/testsuite/install.rs

+21
Original file line numberDiff line numberDiff line change
@@ -2730,3 +2730,24 @@ fn uninstall_running_binary() {
27302730
27312731
"#]]).run();
27322732
}
2733+
2734+
#[cargo_test]
2735+
fn dry_run() {
2736+
pkg("foo", "0.0.1");
2737+
2738+
cargo_process("install foo")
2739+
.with_stderr_data(str![[r#"
2740+
[UPDATING] `dummy-registry` index
2741+
[DOWNLOADING] crates ...
2742+
[DOWNLOADED] foo v0.0.1 (registry `dummy-registry`)
2743+
[INSTALLING] foo v0.0.1
2744+
[COMPILING] foo v0.0.1
2745+
[FINISHED] `release` profile [optimized] target(s) in [ELAPSED]s
2746+
[INSTALLING] [ROOT]/home/.cargo/bin/foo[EXE]
2747+
[INSTALLED] package `foo v0.0.1` (executable `foo[EXE]`)
2748+
[WARNING] be sure to add `[ROOT]/home/.cargo/bin` to your PATH to be able to run the installed binaries
2749+
2750+
"#]])
2751+
.run();
2752+
assert_has_installed_exe(paths::cargo_home(), "foo");
2753+
}

0 commit comments

Comments
 (0)