Skip to content

Commit

Permalink
fix test_cargo_install
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad committed May 18, 2016
1 parent db7d59e commit 97f91a1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/test_cargo_install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ test!(simple {
[DOWNLOADING] foo v0.0.1 (registry file://[..])
[COMPILING] foo v0.0.1 (registry file://[..])
[INSTALLING] {home}[..]bin[..]foo[..]
warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
",
home = cargo_home().display())));
assert_that(cargo_home(), has_installed_exe("foo"));
Expand All @@ -87,6 +88,7 @@ test!(pick_max_version {
[DOWNLOADING] foo v0.0.2 (registry file://[..])
[COMPILING] foo v0.0.2 (registry file://[..])
[INSTALLING] {home}[..]bin[..]foo[..]
warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
",
home = cargo_home().display())));
assert_that(cargo_home(), has_installed_exe("foo"));
Expand All @@ -96,6 +98,7 @@ test!(missing {
pkg("foo", "0.0.1");
assert_that(cargo_process("install").arg("bar"),
execs().with_status(101).with_stderr("\
[UPDATING] registry [..]
[ERROR] could not find `bar` in `registry file://[..]`
"));
});
Expand All @@ -104,6 +107,7 @@ test!(bad_version {
pkg("foo", "0.0.1");
assert_that(cargo_process("install").arg("foo").arg("--vers=0.2.0"),
execs().with_status(101).with_stderr("\
[UPDATING] registry [..]
[ERROR] could not find `foo` in `registry file://[..]` with version `0.2.0`
"));
});
Expand Down Expand Up @@ -210,6 +214,7 @@ test!(multiple_crates_error {

assert_that(cargo_process("install").arg("--git").arg(p.url().to_string()),
execs().with_status(101).with_stderr("\
[UPDATING] git repository [..]
[ERROR] multiple packages with binaries found: bar, foo
"));
});
Expand Down Expand Up @@ -415,6 +420,7 @@ test!(install_force {
execs().with_status(0).with_stderr(&format!("\
[COMPILING] foo v0.2.0 ([..])
[REPLACING] {home}[..]bin[..]foo[..]
warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
",
home = cargo_home().display())));

Expand Down Expand Up @@ -456,6 +462,7 @@ test!(install_force_partial_overlap {
[COMPILING] foo v0.2.0 ([..])
[INSTALLING] {home}[..]bin[..]foo-bin3[..]
[REPLACING] {home}[..]bin[..]foo-bin2[..]
warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
",
home = cargo_home().display())));

Expand Down Expand Up @@ -503,6 +510,7 @@ test!(install_force_bin {
execs().with_status(0).with_stderr(&format!("\
[COMPILING] foo v0.2.0 ([..])
[REPLACING] {home}[..]bin[..]foo-bin2[..]
warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
",
home = cargo_home().display())));

Expand All @@ -528,6 +536,7 @@ test!(compile_failure {

assert_that(cargo_process("install").arg("--path").arg(p.root()),
execs().with_status(101).with_stderr("\
[COMPILING] foo v0.1.0 [..]
error: main function not found
error: aborting due to previous error
[ERROR] failed to compile `foo v0.1.0 (file://[..])`, intermediate artifacts can be \
Expand Down Expand Up @@ -556,6 +565,7 @@ test!(git_repo {
[UPDATING] git repository `[..]`
[COMPILING] foo v0.1.0 ([..])
[INSTALLING] {home}[..]bin[..]foo[..]
warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
",
home = cargo_home().display())));
assert_that(cargo_home(), has_installed_exe("foo"));
Expand Down Expand Up @@ -685,7 +695,6 @@ test!(do_not_rebuilds_on_local_install {
assert_that(cargo_process("install").arg("--path").arg(p.root()),
execs().with_status(0).with_stderr("\
[INSTALLING] [..]
").with_stderr("\
warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
"));

Expand Down

0 comments on commit 97f91a1

Please sign in to comment.