use the rustfmt function to find the bin

makes it possible to execute the test after a release build
This commit is contained in:
Andreas Jonson 2018-12-13 22:49:22 +01:00
parent 836562baf4
commit 653f3ae636

View file

@ -293,7 +293,7 @@ fn stdin_disable_all_formatting_test() {
_ => return, // these tests require nightly
}
let input = String::from("fn main() { println!(\"This should not be formatted.\"); }");
let mut child = Command::new("./target/debug/rustfmt")
let mut child = Command::new(rustfmt().to_str().unwrap())
.stdin(Stdio::piped())
.stdout(Stdio::piped())
.arg("--config-path=./tests/config/disable_all_formatting.toml")