(script: &str)
| 566 | |
| 567 | #[cfg(unix)] |
| 568 | fn checker(script: &str) -> tempfile::TempPath { |
| 569 | use std::os::unix::fs::PermissionsExt; |
| 570 | let mut file = tempfile::NamedTempFile::new().unwrap(); |
| 571 | write!(file, "#!/bin/sh\n{script}\n").unwrap(); |
| 572 | file.as_file() |
| 573 | .set_permissions(std::fs::Permissions::from_mode(0o700)) |
| 574 | .unwrap(); |
| 575 | file.into_temp_path() |
| 576 | } |
| 577 | |
| 578 | #[cfg(unix)] |
| 579 | #[test] |