| 226 | } |
| 227 | |
| 228 | static void testPutBigFile() |
| 229 | { |
| 230 | auto sectors = std::make_shared<TestSectorInterface>(); |
| 231 | auto fs = Filesystem::createCpmFsFilesystem( |
| 232 | globalConfig()->filesystem(), sectors); |
| 233 | fs->create(true, "volume"); |
| 234 | |
| 235 | Bytes filedata; |
| 236 | ByteWriter bw(filedata); |
| 237 | while (filedata.size() < 0x9000) |
| 238 | bw.write_le32(bw.pos); |
| 239 | |
| 240 | fs->putFile(Path("0:BIGFILE"), filedata); |
| 241 | |
| 242 | auto directory = getBlock(sectors, 0, 256).slice(0, 64); |
| 243 | AssertThat(directory, |
| 244 | Equals(createDirent("BIGFILE", |
| 245 | 0, |
| 246 | 0x80, |
| 247 | {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}) + |
| 248 | createDirent("BIGFILE", 2, 0x20, {17, 18}))); |
| 249 | } |
| 250 | |
| 251 | static void testDelete() |
| 252 | { |