| 249 | } |
| 250 | |
| 251 | static void testDelete() |
| 252 | { |
| 253 | auto sectors = std::make_shared<TestSectorInterface>(); |
| 254 | auto fs = Filesystem::createCpmFsFilesystem( |
| 255 | globalConfig()->filesystem(), sectors); |
| 256 | fs->create(true, "volume"); |
| 257 | |
| 258 | fs->putFile(Path("0:FILE1"), Bytes{1, 2, 3, 4}); |
| 259 | fs->putFile(Path("0:FILE2"), Bytes{5, 6, 7, 8}); |
| 260 | fs->deleteFile(Path("0:FILE1")); |
| 261 | |
| 262 | auto directory = getBlock(sectors, 0, 256).slice(0, 64); |
| 263 | AssertThat(directory, |
| 264 | Equals((Bytes{0xe5} * 32) + createDirent("FILE2", 0, 1, {2}))); |
| 265 | } |
| 266 | |
| 267 | static void testMove() |
| 268 | { |
no test coverage detected