clang-format

This commit is contained in:
gabime 2019-10-25 15:44:53 +03:00
parent bfc76278a9
commit c40555c0ac
2 changed files with 53 additions and 56 deletions

View File

@ -13,13 +13,12 @@ bool try_create_dir(const char *path, const char *normalized_path)
return file_exists(normalized_path);
}
TEST_CASE("create_dir", "[create_dir]")
{
prepare_logdir();
REQUIRE(try_create_dir("test_logs/dir1/dir1", "test_logs/dir1/dir1"));
REQUIRE(try_create_dir("test_logs/dir1/dir1", "test_logs/dir1/dir1")); //test existing
REQUIRE(try_create_dir("test_logs/dir1/dir1", "test_logs/dir1/dir1")); // test existing
REQUIRE(try_create_dir("test_logs/dir1///dir2//", "test_logs/dir1/dir2"));
REQUIRE(try_create_dir("./test_logs/dir1/dir3", "test_logs/dir1/dir3"));
REQUIRE(try_create_dir("test_logs/../test_logs/dir1/dir4", "test_logs/dir1/dir4"));
@ -31,7 +30,6 @@ TEST_CASE("create_dir", "[create_dir]")
REQUIRE(try_create_dir(".\\test_logs\\dir1\\dir2\\dir99\\..\\dir23", "test_logs\\dir1\\dir2\\dir23"));
REQUIRE(try_create_dir("test_logs\\..\\test_logs\\dir1\\dir5", "test_logs\\dir1\\dir5"));
#endif
}
TEST_CASE("dir_name", "[create_dir]")
@ -70,5 +68,4 @@ TEST_CASE("dir_name", "[create_dir]")
REQUIRE(dir_name("../file.txt") == "..");
REQUIRE(dir_name("./file.txt") == ".");
#endif
}