diff options
| author | Chad Rosier <mcrosier@apple.com> | 2011-12-12 17:58:31 +0000 |
|---|---|---|
| committer | Chad Rosier <mcrosier@apple.com> | 2011-12-12 17:58:31 +0000 |
| commit | 531042840d376087b01475ec1a61d26329c471a7 (patch) | |
| tree | beaadfd8e3bf99ba8e81e20270b28e8503a22338 /llvm/unittests | |
| parent | 735cb8bcdcb8dac5ea92ccf13bb16e9dc02caf62 (diff) | |
| download | bcm5719-llvm-531042840d376087b01475ec1a61d26329c471a7.tar.gz bcm5719-llvm-531042840d376087b01475ec1a61d26329c471a7.zip | |
Revert r146363 to allow buildbots to make forward progress.
Original commit message:
Support/FileSystem: Implement canonicalize.
llvm-svn: 146378
Diffstat (limited to 'llvm/unittests')
| -rw-r--r-- | llvm/unittests/Support/Path.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp index 456b171dfce..358dad0f838 100644 --- a/llvm/unittests/Support/Path.cpp +++ b/llvm/unittests/Support/Path.cpp @@ -312,32 +312,4 @@ TEST_F(FileSystemTest, Magic) { } } -TEST_F(FileSystemTest, Canonicalize) { - SmallString<128> file_pathname(TestDirectory); - path::append(file_pathname, "canonicalize", "a0", "aa1"); - - bool existed; - ASSERT_NO_ERROR(fs::create_directories(Twine(TestDirectory) - + "/canonicalize/a0/aa1", existed)); - - { - path::append(file_pathname, "file.txt"); - std::string ErrMsg; - raw_fd_ostream file(file_pathname.c_str(), ErrMsg); - file << "hello\n"; - } - - SmallString<0> res; - ASSERT_NO_ERROR(fs::canonicalize(Twine(TestDirectory) - + "/cAnOnIcAlIzE/A0/aA1/fIlE.TxT", res)); - // Only check if we actually found the file. As we won't find it on case - // sensitive file systems. - if (fs::exists(res.str())) { - ASSERT_TRUE(res.str().find("canonicalize") != StringRef::npos); - ASSERT_TRUE(res.str().find("a0") != StringRef::npos); - ASSERT_TRUE(res.str().find("aa1") != StringRef::npos); - ASSERT_TRUE(res.str().find("file.txt") != StringRef::npos); - } -} - } // anonymous namespace |

