From 3b2a6f0a3a1654efa46a8593a2e91d0b372beda6 Mon Sep 17 00:00:00 2001 From: Antoine Gersant Date: Sat, 17 Dec 2016 20:03:49 -0800 Subject: [PATCH] Fixed broken test on Linux --- src/config.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index 8a809b6..005888d 100644 --- a/src/config.rs +++ b/src/config.rs @@ -202,7 +202,11 @@ fn clean_path_string(path_string: &str) -> path::PathBuf { #[test] fn test_clean_path_string() { let mut correct_path = path::PathBuf::new(); - correct_path.push("C:\\"); + if cfg!(target_os = "windows") { + correct_path.push("C:\\"); + } else { + correct_path.push("/usr"); + } correct_path.push("some"); correct_path.push("path"); assert_eq!(correct_path, clean_path_string(r#"C:/some/path"#));