(body: &str)
| 21 | } |
| 22 | |
| 23 | fn checker(body: &str) -> tempfile::TempPath { |
| 24 | let mut file = tempfile::NamedTempFile::new().unwrap(); |
| 25 | write!(file, "#!/bin/sh\nset -e\n{body}\n").unwrap(); |
| 26 | file.as_file() |
| 27 | .set_permissions(std::fs::Permissions::from_mode(0o700)) |
| 28 | .unwrap(); |
| 29 | file.into_temp_path() |
| 30 | } |
| 31 | |
| 32 | fn quote(value: &str) -> String { |
| 33 | format!("'{}'", value.replace('\'', "'\"'\"'")) |
no test coverage detected