This commit is contained in:
@ -265,6 +265,17 @@ TEST(utils_file, smb_parent_is_not_same) {
|
|||||||
|
|
||||||
TEST(util_file, directory_exists_in_path) {
|
TEST(util_file, directory_exists_in_path) {
|
||||||
auto &test_dir = test::generate_test_directory();
|
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");
|
auto sub_dir = test_dir.create_directory("moose");
|
||||||
EXPECT_TRUE(sub_dir != nullptr);
|
EXPECT_TRUE(sub_dir != nullptr);
|
||||||
if (sub_dir) {
|
if (sub_dir) {
|
||||||
@ -284,6 +295,18 @@ TEST(util_file, directory_exists_in_path) {
|
|||||||
|
|
||||||
TEST(util_file, file_exists_in_path) {
|
TEST(util_file, file_exists_in_path) {
|
||||||
auto &test_dir = test::generate_test_directory();
|
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);
|
auto sub_file = test_dir.create_file("moose.txt", false);
|
||||||
EXPECT_TRUE(sub_file != nullptr);
|
EXPECT_TRUE(sub_file != nullptr);
|
||||||
if (sub_file) {
|
if (sub_file) {
|
||||||
|
Reference in New Issue
Block a user