()
| 545 | #[cfg(unix)] |
| 546 | #[test] |
| 547 | fn test_set_permissions() { |
| 548 | use std::os::unix::fs::PermissionsExt; |
| 549 | |
| 550 | let (dir, fs) = temp_fs(); |
| 551 | let path = dir.path().join("file.txt"); |
| 552 | std::fs::write(&path, "content").unwrap(); |
| 553 | |
| 554 | fs.set_permissions("file.txt", 0o755).unwrap(); |
| 555 | |
| 556 | let perms = std::fs::metadata(&path).unwrap().permissions(); |
| 557 | assert_eq!(perms.mode() & 0o777, 0o755); |
| 558 | } |
| 559 | |
| 560 | #[test] |
| 561 | fn test_is_writable_file() { |
nothing calls this directly
no test coverage detected