mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Test that env_clear
works on Windows
This commit is contained in:
parent
365a3586a9
commit
16145a9952
@ -399,3 +399,12 @@ fn test_command_implements_send_sync() {
|
||||
fn take_send_sync_type<T: Send + Sync>(_: T) {}
|
||||
take_send_sync_type(Command::new(""))
|
||||
}
|
||||
|
||||
// Ensure that starting a process with no environment variables works on Windows.
|
||||
// This will fail if the environment block is ill-formed.
|
||||
#[test]
|
||||
#[cfg(windows)]
|
||||
fn env_empty() {
|
||||
let p = Command::new("cmd").args(&["/C", "exit 0"]).env_clear().spawn();
|
||||
assert!(p.is_ok());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user