about summary refs log tree commit diff
path: root/library/std/src/sys/windows/process
diff options
context:
space:
mode:
authorChris Denton <christophersdenton@gmail.com>2022-01-05 17:05:58 +0000
committerChris Denton <christophersdenton@gmail.com>2022-02-17 13:12:49 +0000
commitd4686c60669591ea9ae6e4391fc7a6628ce8062a (patch)
tree8ab067e705c53a1516a18b2e4d46b9e9bcdbd596 /library/std/src/sys/windows/process
parent582b6964a8868c9714881d9821d08415a8f4f13b (diff)
downloadrust-d4686c60669591ea9ae6e4391fc7a6628ce8062a.tar.gz
rust-d4686c60669591ea9ae6e4391fc7a6628ce8062a.zip
Use verbatim paths for `process::Command` if necessary
Diffstat (limited to 'library/std/src/sys/windows/process')
-rw-r--r--library/std/src/sys/windows/process/tests.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/library/std/src/sys/windows/process/tests.rs b/library/std/src/sys/windows/process/tests.rs
index d18c3d855bc..a199bb8b567 100644
--- a/library/std/src/sys/windows/process/tests.rs
+++ b/library/std/src/sys/windows/process/tests.rs
@@ -3,11 +3,12 @@ use super::Arg;
 use crate::env;
 use crate::ffi::{OsStr, OsString};
 use crate::process::Command;
+use crate::sys::to_u16s;
 
 #[test]
 fn test_raw_args() {
     let command_line = &make_command_line(
-        OsStr::new("quoted exe"),
+        &to_u16s("quoted exe").unwrap(),
         &[
             Arg::Regular(OsString::from("quote me")),
             Arg::Raw(OsString::from("quote me *not*")),
@@ -16,6 +17,7 @@ fn test_raw_args() {
             Arg::Regular(OsString::from("optional-quotes")),
         ],
         false,
+        false,
     )
     .unwrap();
     assert_eq!(
@@ -28,9 +30,10 @@ fn test_raw_args() {
 fn test_make_command_line() {
     fn test_wrapper(prog: &str, args: &[&str], force_quotes: bool) -> String {
         let command_line = &make_command_line(
-            OsStr::new(prog),
+            &to_u16s(prog).unwrap(),
             &args.iter().map(|a| Arg::Regular(OsString::from(a))).collect::<Vec<_>>(),
             force_quotes,
+            false,
         )
         .unwrap();
         String::from_utf16(command_line).unwrap()