about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLzu Tao <taolzu@gmail.com>2020-03-14 14:30:08 +0000
committerLzu Tao <taolzu@gmail.com>2020-03-14 22:20:16 +0700
commit9febcf5e8d4f29b12e5c5d77da174d0a3d21008b (patch)
tree22f7dfc627a0d4a80dd4cc3665b71a56ae55016d
parent6be02209672e4bcd8cf96cb417216a0abe1b4fe3 (diff)
downloadrust-9febcf5e8d4f29b12e5c5d77da174d0a3d21008b.tar.gz
rust-9febcf5e8d4f29b12e5c5d77da174d0a3d21008b.zip
Don't convert Path to lossy str
-rw-r--r--tests/integration.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/integration.rs b/tests/integration.rs
index 8cc78c98a65..4f373e034bc 100644
--- a/tests/integration.rs
+++ b/tests/integration.rs
@@ -1,6 +1,7 @@
 #![cfg(feature = "integration")]
 
 use std::env;
+use std::ffi::OsStr;
 use std::process::Command;
 
 #[cfg_attr(feature = "integration", test)]
@@ -16,7 +17,12 @@ fn integration_test() {
     repo_dir.push(crate_name);
 
     let st = Command::new("git")
-        .args(&["clone", "--depth=1", &repo_url, repo_dir.to_str().unwrap()])
+        .args(&[
+            OsStr::new("clone"),
+            OsStr::new("--depth=1"),
+            OsStr::new(&repo_url),
+            OsStr::new(&repo_dir),
+        ])
         .status()
         .expect("unable to run git");
     assert!(st.success());