diff --git a/tests/testsuite/install.rs b/tests/testsuite/install.rs index 3c55c84bd158..f0f82d1539bb 100644 --- a/tests/testsuite/install.rs +++ b/tests/testsuite/install.rs @@ -2730,3 +2730,24 @@ fn uninstall_running_binary() { "#]]).run(); } + +#[cargo_test] +fn dry_run() { + pkg("foo", "0.0.1"); + + cargo_process("install foo") + .with_stderr_data(str![[r#" +[UPDATING] `dummy-registry` index +[DOWNLOADING] crates ... +[DOWNLOADED] foo v0.0.1 (registry `dummy-registry`) +[INSTALLING] foo v0.0.1 +[COMPILING] foo v0.0.1 +[FINISHED] `release` profile [optimized] target(s) in [ELAPSED]s +[INSTALLING] [ROOT]/home/.cargo/bin/foo[EXE] +[INSTALLED] package `foo v0.0.1` (executable `foo[EXE]`) +[WARNING] be sure to add `[ROOT]/home/.cargo/bin` to your PATH to be able to run the installed binaries + +"#]]) + .run(); + assert_has_installed_exe(paths::cargo_home(), "foo"); +}