MCPcopy Create free account
hub / github.com/catboost/catboost / TestCwdOpts

Method TestCwdOpts

util/system/fs_ut.cpp:283–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283void 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
298void TFsTest::TestEnsureExists() {
299 TFsPath fileExists = "tmp_file_абвг.txt";

Callers

nothing calls this directly

Calls 2

MakeDirectoryFunction · 0.85
FixMethod · 0.45

Tested by

no test coverage detected