mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-08 16:07:43 +00:00
some more Windows argument passing tests
This commit is contained in:
parent
76057dc518
commit
405de0217d
@ -443,8 +443,8 @@ mod tests {
|
|||||||
fn windows_argv0_no_escape() {
|
fn windows_argv0_no_escape() {
|
||||||
// Ensure that a trailing backslash in argv[0] is not escaped.
|
// Ensure that a trailing backslash in argv[0] is not escaped.
|
||||||
let cmd = String::from_utf16_lossy(&args_to_utf16_command_string(
|
let cmd = String::from_utf16_lossy(&args_to_utf16_command_string(
|
||||||
[r"C:\Program Files\", "arg1"].iter(),
|
[r"C:\Program Files\", "arg1", "arg 2", "arg \" 3"].iter(),
|
||||||
));
|
));
|
||||||
assert_eq!(cmd.trim_end_matches("\0"), r#""C:\Program Files\" arg1"#);
|
assert_eq!(cmd.trim_end_matches("\0"), r#""C:\Program Files\" arg1 "arg 2" "arg \" 3""#);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ def test_cargo_miri_run():
|
|||||||
# so keep it set
|
# so keep it set
|
||||||
)
|
)
|
||||||
test("`cargo miri run` (with arguments and target)",
|
test("`cargo miri run` (with arguments and target)",
|
||||||
cargo_miri("run") + ["--bin", "cargo-miri-test", "--", "hello world", '"hello world"'],
|
cargo_miri("run") + ["--bin", "cargo-miri-test", "--", "hello world", '"hello world"', r'he\\llo\"world'],
|
||||||
"run.args.stdout.ref", "run.args.stderr.ref",
|
"run.args.stdout.ref", "run.args.stderr.ref",
|
||||||
)
|
)
|
||||||
test("`cargo miri r` (subcrate, no isolation)",
|
test("`cargo miri r` (subcrate, no isolation)",
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
main
|
main
|
||||||
hello world
|
hello world
|
||||||
"hello world"
|
"hello world"
|
||||||
|
he\\llo\"world
|
||||||
|
Loading…
Reference in New Issue
Block a user