mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 12:19:53 +00:00
Windows-specific test for sys::path::remove_dots.
Differential Revision: http://reviews.llvm.org/D14503 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252504 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
034a965d5a
commit
da4cf2cda9
@ -853,6 +853,18 @@ static std::string remove_dots(StringRef path,
|
||||
}
|
||||
|
||||
TEST(Support, RemoveDots) {
|
||||
#if defined(LLVM_ON_WIN32)
|
||||
EXPECT_EQ("foolz\\wat", remove_dots(".\\.\\\\foolz\\wat", false));
|
||||
EXPECT_EQ("", remove_dots(".\\\\\\\\\\", false));
|
||||
|
||||
EXPECT_EQ("a\\..\\b\\c", remove_dots(".\\a\\..\\b\\c", false));
|
||||
EXPECT_EQ("b\\c", remove_dots(".\\a\\..\\b\\c", true));
|
||||
EXPECT_EQ("c", remove_dots(".\\.\\c", true));
|
||||
|
||||
SmallString<64> Path1(".\\.\\c");
|
||||
EXPECT_TRUE(path::remove_dots(Path1, true));
|
||||
EXPECT_EQ("c", Path1);
|
||||
#else
|
||||
EXPECT_EQ("foolz/wat", remove_dots("././/foolz/wat", false));
|
||||
EXPECT_EQ("", remove_dots("./////", false));
|
||||
|
||||
@ -863,5 +875,6 @@ TEST(Support, RemoveDots) {
|
||||
SmallString<64> Path1("././c");
|
||||
EXPECT_TRUE(path::remove_dots(Path1, true));
|
||||
EXPECT_EQ("c", Path1);
|
||||
#endif
|
||||
}
|
||||
} // anonymous namespace
|
||||
|
Loading…
Reference in New Issue
Block a user