Skip to content

Commit

Permalink
Add mercy for devs that run cargo test without building
Browse files Browse the repository at this point in the history
  • Loading branch information
alexheretic committed May 28, 2018
1 parent 5473c3f commit cd925f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,10 @@ fn rustfmt() -> PathBuf {
me.pop(); // chop of the test name
me.pop(); // chop off `deps`
me.push("rustfmt");
assert!(
me.is_file() || me.with_extension("exe").is_file(),
"no rustfmt bin, try running `cargo build` before testing"
);
return me;
}

Expand Down

0 comments on commit cd925f0

Please sign in to comment.