Inserts or updates an environment variable mapping. Note that environment variable names are case-insensitive (but case-preserving) on Windows, and case-sensitive on all other platforms. # Examples Basic usage: ```no_run use assert_cmd::Command; Command::new("ls") .env("PATH", "/bin") .unwrap_err(); ```
(&mut self, key: K, val: V)
| 316 | /// .unwrap_err(); |
| 317 | /// ``` |
| 318 | pub fn env<K, V>(&mut self, key: K, val: V) -> &mut Self |
| 319 | where |
| 320 | K: AsRef<ffi::OsStr>, |
| 321 | V: AsRef<ffi::OsStr>, |
| 322 | { |
| 323 | self.cmd.env(key, val); |
| 324 | self |
| 325 | } |
| 326 | |
| 327 | /// Adds or updates multiple environment variable mappings. |
| 328 | /// |
no outgoing calls