| 281 | } |
| 282 | |
| 283 | void TFsTest::TestCwdOpts() { |
| 284 | TFsPath initialCwd = NFs::CurrentWorkingDirectory(); |
| 285 | TFsPath subdir = "dir_forcwd_абвг"; |
| 286 | NFs::MakeDirectory(subdir, NFs::FP_SECRET_FILE | NFs::FP_ALL_READ); |
| 287 | NFs::SetCurrentWorkingDirectory(subdir); |
| 288 | TFsPath newCwd = NFs::CurrentWorkingDirectory(); |
| 289 | |
| 290 | UNIT_ASSERT_EQUAL(newCwd.Fix(), (initialCwd / subdir).Fix()); |
| 291 | |
| 292 | NFs::SetCurrentWorkingDirectory(".."); |
| 293 | TFsPath newCwd2 = NFs::CurrentWorkingDirectory(); |
| 294 | UNIT_ASSERT_EQUAL(newCwd2.Fix(), initialCwd.Fix()); |
| 295 | UNIT_ASSERT(NFs::Remove(subdir)); |
| 296 | } |
| 297 | |
| 298 | void TFsTest::TestEnsureExists() { |
| 299 | TFsPath fileExists = "tmp_file_абвг.txt"; |
nothing calls this directly
no test coverage detected