From 653f3ae63690c9a1a37b72a49bfbe1d0384c5919 Mon Sep 17 00:00:00 2001 From: Andreas Jonson Date: Thu, 13 Dec 2018 22:49:22 +0100 Subject: [PATCH] use the rustfmt function to find the bin makes it possible to execute the test after a release build --- src/test/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/mod.rs b/src/test/mod.rs index e2c2380bc2a..d54245c78c9 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -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")