mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 23:03:06 +03:00
Test escaping of trialing slashes in Windows command-line args
This commit is contained in:
@@ -17,6 +17,11 @@ fn test_wrapper(prog: &str, args: &[&str], force_quotes: bool) -> String {
|
||||
|
||||
assert_eq!(test_wrapper("prog", &["aaa", "bbb", "ccc"], false), "\"prog\" aaa bbb ccc");
|
||||
|
||||
assert_eq!(test_wrapper("prog", &[r"C:\"], false), r#""prog" C:\"#);
|
||||
assert_eq!(test_wrapper("prog", &[r"2slashes\\"], false), r#""prog" 2slashes\\"#);
|
||||
assert_eq!(test_wrapper("prog", &[r" C:\"], false), r#""prog" " C:\\""#);
|
||||
assert_eq!(test_wrapper("prog", &[r" 2slashes\\"], false), r#""prog" " 2slashes\\\\""#);
|
||||
|
||||
assert_eq!(
|
||||
test_wrapper("C:\\Program Files\\blah\\blah.exe", &["aaa"], false),
|
||||
"\"C:\\Program Files\\blah\\blah.exe\" aaa"
|
||||
|
||||
Reference in New Issue
Block a user