}
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));
SmallString<64> Path1("././c");
EXPECT_TRUE(path::remove_dots(Path1, true));
EXPECT_EQ("c", Path1);
+#endif
}
} // anonymous namespace