Skip to content

Commit

Permalink
Fix tests if cargo fix is already installed
Browse files Browse the repository at this point in the history
Make sure that we always run the version that we're compiling locally
  • Loading branch information
alexcrichton committed May 4, 2018
1 parent 18f0217 commit cab6296
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cargo-fix/tests/all/dependencies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fn fix_path_deps() {
[CHECKING] foo v0.1.0 (CWD)
[FINISHED] dev [unoptimized + debuginfo]
";
p.expect_cmd("cargo fix")
p.expect_cmd("cargo-fix fix")
.stdout("")
.stderr(stderr)
.run();
Expand Down Expand Up @@ -93,7 +93,7 @@ fn do_not_fix_non_relevant_deps() {
"#)
.build();

p.expect_cmd("cargo fix")
p.expect_cmd("cargo-fix fix")
.cwd("foo")
.status(101)
.run();
Expand Down
12 changes: 6 additions & 6 deletions cargo-fix/tests/all/smoke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn no_changes_necessary() {
[CHECKING] foo v0.1.0 (CWD)
[FINISHED] dev [unoptimized + debuginfo]
";
p.expect_cmd("cargo fix")
p.expect_cmd("cargo-fix fix")
.stdout("")
.stderr(stderr)
.run();
Expand All @@ -34,7 +34,7 @@ fn fixes_missing_ampersand() {
[CHECKING] foo v0.1.0 (CWD)
[FINISHED] dev [unoptimized + debuginfo]
";
p.expect_cmd("cargo fix")
p.expect_cmd("cargo-fix fix")
.stdout("")
.stderr(stderr)
.run();
Expand All @@ -58,7 +58,7 @@ fn fixes_two_missing_ampersands() {
[CHECKING] foo v0.1.0 (CWD)
[FINISHED] dev [unoptimized + debuginfo]
";
p.expect_cmd("cargo fix")
p.expect_cmd("cargo-fix fix")
.stdout("")
.stderr(stderr)
.run();
Expand All @@ -82,7 +82,7 @@ fn tricky_ampersand() {
[CHECKING] foo v0.1.0 (CWD)
[FINISHED] dev [unoptimized + debuginfo]
";
p.expect_cmd("cargo fix")
p.expect_cmd("cargo-fix fix")
.stdout("")
.stderr(stderr)
.run();
Expand All @@ -97,7 +97,7 @@ fn preserve_line_endings() {
")
.build();

p.expect_cmd("cargo fix").run();
p.expect_cmd("cargo-fix fix").run();
assert!(p.read("src/lib.rs").contains("\r\n"));
}

Expand All @@ -123,7 +123,7 @@ error: Could not compile `foo`.
To learn more, run the command again with --verbose.
";

p.expect_cmd("cargo fix")
p.expect_cmd("cargo-fix fix")
.stderr(stderr)
.status(101)
.run();
Expand Down

0 comments on commit cab6296

Please sign in to comment.