Lines Matching refs:FilePath
63 FilePath filepath(path); in _rmdir()
74 const FilePath original_dir = FilePath::GetCurrentDir();
78 const FilePath cwd = FilePath::GetCurrentDir();
98 EXPECT_TRUE(FilePath("").IsEmpty()); in TEST()
102 EXPECT_FALSE(FilePath("a").IsEmpty()); in TEST()
103 EXPECT_FALSE(FilePath(".").IsEmpty()); in TEST()
104 EXPECT_FALSE(FilePath("a/b").IsEmpty()); in TEST()
105 EXPECT_FALSE(FilePath("a\\b\\").IsEmpty()); in TEST()
110 EXPECT_EQ("", FilePath("").RemoveDirectoryName().string()); in TEST()
116 FilePath("afile").RemoveDirectoryName().string()); in TEST()
122 FilePath(GTEST_PATH_SEP_ "afile").RemoveDirectoryName().string()); in TEST()
128 FilePath("adir" GTEST_PATH_SEP_).RemoveDirectoryName().string()); in TEST()
134 FilePath("adir" GTEST_PATH_SEP_ "afile").RemoveDirectoryName().string()); in TEST()
140 FilePath("adir" GTEST_PATH_SEP_ "subdir" GTEST_PATH_SEP_ "afile") in TEST()
151 EXPECT_EQ("afile", FilePath("/afile").RemoveDirectoryName().string()); in TEST()
156 EXPECT_EQ("", FilePath("adir/").RemoveDirectoryName().string()); in TEST()
161 EXPECT_EQ("afile", FilePath("adir/afile").RemoveDirectoryName().string()); in TEST()
167 FilePath("adir/subdir/afile").RemoveDirectoryName().string()); in TEST()
176 EXPECT_EQ(GTEST_PATH_SEP_, FilePath("").RemoveFileName().string()); in TEST()
178 EXPECT_EQ("." GTEST_PATH_SEP_, FilePath("").RemoveFileName().string()); in TEST()
185 FilePath("adir" GTEST_PATH_SEP_).RemoveFileName().string()); in TEST()
191 FilePath("adir" GTEST_PATH_SEP_ "afile").RemoveFileName().string()); in TEST()
197 FilePath("adir" GTEST_PATH_SEP_ "subdir" GTEST_PATH_SEP_ "afile") in TEST()
204 FilePath(GTEST_PATH_SEP_ "afile").RemoveFileName().string()); in TEST()
215 FilePath("adir/").RemoveFileName().string()); in TEST()
221 FilePath("adir/afile").RemoveFileName().string()); in TEST()
227 FilePath("adir/subdir/afile").RemoveFileName().string()); in TEST()
232 EXPECT_EQ(GTEST_PATH_SEP_, FilePath("/afile").RemoveFileName().string()); in TEST()
238 FilePath actual = FilePath::MakeFileName(FilePath("foo"), FilePath("bar"), in TEST()
244 FilePath actual = FilePath::MakeFileName(FilePath("foo"), FilePath("bar"), in TEST()
250 FilePath actual = FilePath::MakeFileName(FilePath("foo" GTEST_PATH_SEP_), in TEST()
251 FilePath("bar"), 0, "xml"); in TEST()
256 FilePath actual = FilePath::MakeFileName(FilePath("foo" GTEST_PATH_SEP_), in TEST()
257 FilePath("bar"), 12, "xml"); in TEST()
262 FilePath actual = FilePath::MakeFileName(FilePath(""), FilePath("bar"), in TEST()
268 FilePath actual = FilePath::MakeFileName(FilePath(""), FilePath("bar"), in TEST()
274 FilePath actual = FilePath::ConcatPaths(FilePath("foo"), in TEST()
275 FilePath("bar.xml")); in TEST()
280 FilePath actual = FilePath::ConcatPaths(FilePath("foo" GTEST_PATH_SEP_), in TEST()
281 FilePath("bar.xml")); in TEST()
286 FilePath actual = FilePath::ConcatPaths(FilePath(""), in TEST()
287 FilePath("bar.xml")); in TEST()
292 FilePath actual = FilePath::ConcatPaths(FilePath("foo"), FilePath("")); in TEST()
297 FilePath actual = FilePath::ConcatPaths(FilePath(""), in TEST()
298 FilePath("")); in TEST()
303 FilePath actual = FilePath::ConcatPaths(FilePath("foo" GTEST_PATH_SEP_ "bar"), in TEST()
304 FilePath("foobar.xml")); in TEST()
310 FilePath actual = FilePath::ConcatPaths( in TEST()
311 FilePath("foo" GTEST_PATH_SEP_), in TEST()
312 FilePath("bar" GTEST_PATH_SEP_ "bar.xml")); in TEST()
318 FilePath actual = FilePath::ConcatPaths(FilePath("foo"), in TEST()
319 FilePath("bar" GTEST_PATH_SEP_)); in TEST()
325 EXPECT_EQ("", FilePath("").RemoveTrailingPathSeparator().string()); in TEST()
330 EXPECT_EQ("foo", FilePath("foo").RemoveTrailingPathSeparator().string()); in TEST()
336 FilePath("foo" GTEST_PATH_SEP_).RemoveTrailingPathSeparator().string()); in TEST()
338 EXPECT_EQ("foo", FilePath("foo/").RemoveTrailingPathSeparator().string()); in TEST()
345 FilePath("foo" GTEST_PATH_SEP_ "bar" GTEST_PATH_SEP_) in TEST()
352 FilePath("foo" GTEST_PATH_SEP_ "bar") in TEST()
363 EXPECT_TRUE(FilePath(current_drive).DirectoryExists()); in TEST()
365 EXPECT_TRUE(FilePath("/").DirectoryExists()); in TEST()
380 EXPECT_FALSE(FilePath(non_drive).DirectoryExists()); in TEST()
390 EXPECT_FALSE(FilePath("").DirectoryExists()); in TEST()
398 EXPECT_TRUE(FilePath(".").DirectoryExists()); in TEST()
399 EXPECT_TRUE(FilePath(".\\").DirectoryExists()); in TEST()
403 EXPECT_TRUE(FilePath(".").DirectoryExists()); in TEST()
404 EXPECT_TRUE(FilePath("./").DirectoryExists()); in TEST()
411 FilePath("foo" GTEST_PATH_SEP_ "bar").string()); in TEST()
413 FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_ "bar").string()); in TEST()
415 FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_ in TEST()
422 FilePath(GTEST_PATH_SEP_ "bar").string()); in TEST()
424 FilePath(GTEST_PATH_SEP_ GTEST_PATH_SEP_ "bar").string()); in TEST()
426 FilePath(GTEST_PATH_SEP_ GTEST_PATH_SEP_ GTEST_PATH_SEP_ "bar").string()); in TEST()
432 FilePath("foo" GTEST_PATH_SEP_).string()); in TEST()
434 FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_).string()); in TEST()
436 FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_ GTEST_PATH_SEP_).string()); in TEST()
446 FilePath("foo/").string()); in TEST()
448 FilePath("foo" GTEST_PATH_SEP_ "/").string()); in TEST()
450 FilePath("foo//" GTEST_PATH_SEP_).string()); in TEST()
456 FilePath default_path; in TEST()
457 FilePath non_default_path("path"); in TEST()
464 FilePath non_default_path("path"); in TEST()
465 FilePath default_path; in TEST()
472 const FilePath const_default_path("const_path"); in TEST()
473 FilePath non_default_path("path"); in TEST()
481 testdata_path_.Set(FilePath( in SetUp()
486 unique_file0_.Set(FilePath::MakeFileName(testdata_path_, FilePath("unique"), in SetUp()
488 unique_file1_.Set(FilePath::MakeFileName(testdata_path_, FilePath("unique"), in SetUp()
513 FilePath testdata_path_; // "/tmp/directory_creation/test/"
514 FilePath testdata_file_; // "/tmp/directory_creation/test"
515 FilePath unique_file0_; // "/tmp/directory_creation/test/unique.txt"
516 FilePath unique_file1_; // "/tmp/directory_creation/test/unique_1.txt"
533 FilePath file_path(FilePath::GenerateUniqueFileName(testdata_path_, in TEST_F()
534 FilePath("unique"), "txt")); in TEST_F()
543 FilePath file_path2(FilePath::GenerateUniqueFileName(testdata_path_, in TEST_F()
544 FilePath("unique"), "txt")); in TEST_F()
560 const FilePath test_detail_xml("test_detail.xml"); in TEST()
565 FilePath fp; in TEST()
570 const FilePath fp("spicy"); in TEST()
573 const FilePath fp_copy(fp); in TEST()
578 const FilePath fp(std::string("cider")); in TEST()
583 const FilePath apple("apple"); in TEST()
584 FilePath mac("mac"); in TEST()
591 const FilePath file("drink"); in TEST()
596 EXPECT_EQ("app", FilePath("app.cc").RemoveExtension("cc").string()); in TEST()
597 EXPECT_EQ("app", FilePath("app.exe").RemoveExtension("exe").string()); in TEST()
598 EXPECT_EQ("APP", FilePath("APP.EXE").RemoveExtension("exe").string()); in TEST()
602 EXPECT_EQ("app", FilePath("app").RemoveExtension("exe").string()); in TEST()
606 EXPECT_FALSE(FilePath("cola").IsDirectory()); in TEST()
607 EXPECT_TRUE(FilePath("koala" GTEST_PATH_SEP_).IsDirectory()); in TEST()
609 EXPECT_TRUE(FilePath("koala/").IsDirectory()); in TEST()
614 EXPECT_FALSE(FilePath("is" GTEST_PATH_SEP_ "relative").IsAbsolutePath()); in TEST()
615 EXPECT_FALSE(FilePath("").IsAbsolutePath()); in TEST()
617 EXPECT_TRUE(FilePath("c:\\" GTEST_PATH_SEP_ "is_not" in TEST()
619 EXPECT_FALSE(FilePath("c:foo" GTEST_PATH_SEP_ "bar").IsAbsolutePath()); in TEST()
620 EXPECT_TRUE(FilePath("c:/" GTEST_PATH_SEP_ "is_not" in TEST()
623 EXPECT_TRUE(FilePath(GTEST_PATH_SEP_ "is_not" GTEST_PATH_SEP_ "relative") in TEST()
630 EXPECT_TRUE(FilePath("a:\\").IsRootDirectory()); in TEST()
631 EXPECT_TRUE(FilePath("Z:/").IsRootDirectory()); in TEST()
632 EXPECT_TRUE(FilePath("e://").IsRootDirectory()); in TEST()
633 EXPECT_FALSE(FilePath("").IsRootDirectory()); in TEST()
634 EXPECT_FALSE(FilePath("b:").IsRootDirectory()); in TEST()
635 EXPECT_FALSE(FilePath("b:a").IsRootDirectory()); in TEST()
636 EXPECT_FALSE(FilePath("8:/").IsRootDirectory()); in TEST()
637 EXPECT_FALSE(FilePath("c|/").IsRootDirectory()); in TEST()
639 EXPECT_TRUE(FilePath("/").IsRootDirectory()); in TEST()
640 EXPECT_TRUE(FilePath("//").IsRootDirectory()); in TEST()
641 EXPECT_FALSE(FilePath("").IsRootDirectory()); in TEST()
642 EXPECT_FALSE(FilePath("\\").IsRootDirectory()); in TEST()
643 EXPECT_FALSE(FilePath("/x").IsRootDirectory()); in TEST()