()
| 567 | #[cfg(unix)] |
| 568 | #[test] |
| 569 | fn test_set_permissions() { |
| 570 | use std::os::unix::fs::PermissionsExt; |
| 571 | |
| 572 | let (dir, fs) = temp_fs(); |
| 573 | let path = dir.path().join("file.txt"); |
| 574 | std::fs::write(&path, "content").unwrap(); |
| 575 | |
| 576 | fs.set_permissions("file.txt", 0o755).unwrap(); |
| 577 | |
| 578 | let perms = std::fs::metadata(&path).unwrap().permissions(); |
| 579 | assert_eq!(perms.mode() & 0o777, 0o755); |
| 580 | } |
| 581 | |
| 582 | #[test] |
| 583 | fn test_is_writable_file() { |
nothing calls this directly
no test coverage detected