()
| 1156 | |
| 1157 | #[test] |
| 1158 | fn test_directory_archive_create_file() { |
| 1159 | let temp_dir = TempDir::new().unwrap(); |
| 1160 | let archive_dir = temp_dir.path().join("archive"); |
| 1161 | |
| 1162 | let mut archive = DirectoryArchive::new(&archive_dir).unwrap(); |
| 1163 | let mut writer = archive.create_file("test.txt", 11, 0o644, 0).unwrap(); |
| 1164 | |
| 1165 | writer.write_all(b"Hello World").unwrap(); |
| 1166 | archive.close_file(writer).unwrap(); |
| 1167 | |
| 1168 | let contents = std::fs::read_to_string(archive_dir.join("test.txt")).unwrap(); |
| 1169 | assert_eq!(contents, "Hello World"); |
| 1170 | } |
| 1171 | |
| 1172 | #[test] |
| 1173 | fn test_directory_archive_create_nested_file() { |
nothing calls this directly
no test coverage detected