diff --git a/support/test/src/utils/file_test.cpp b/support/test/src/utils/file_test.cpp index 330898b6..569b75db 100644 --- a/support/test/src/utils/file_test.cpp +++ b/support/test/src/utils/file_test.cpp @@ -265,6 +265,17 @@ TEST(utils_file, smb_parent_is_not_same) { TEST(util_file, directory_exists_in_path) { auto &test_dir = test::generate_test_directory(); + EXPECT_FALSE( + utils::file::directory_exists_in_path(test_dir.get_path(), "moose")); + + EXPECT_FALSE(utils::file::directory_exists_in_path( + utils::string::from_utf8(test_dir.get_path()), L"moose")); + + EXPECT_FALSE(utils::file::file_exists_in_path(test_dir.get_path(), "moose")); + + EXPECT_FALSE(utils::file::file_exists_in_path( + utils::string::from_utf8(test_dir.get_path()), L"moose")); + auto sub_dir = test_dir.create_directory("moose"); EXPECT_TRUE(sub_dir != nullptr); if (sub_dir) { @@ -284,6 +295,18 @@ TEST(util_file, directory_exists_in_path) { TEST(util_file, file_exists_in_path) { auto &test_dir = test::generate_test_directory(); + EXPECT_FALSE( + utils::file::file_exists_in_path(test_dir.get_path(), "moose.txt")); + + EXPECT_FALSE(utils::file::file_exists_in_path( + utils::string::from_utf8(test_dir.get_path()), L"moose.txt")); + + EXPECT_FALSE( + utils::file::directory_exists_in_path(test_dir.get_path(), "moose.txt")); + + EXPECT_FALSE(utils::file::directory_exists_in_path( + utils::string::from_utf8(test_dir.get_path()), L"moose.txt")); + auto sub_file = test_dir.create_file("moose.txt", false); EXPECT_TRUE(sub_file != nullptr); if (sub_file) {