[PATCH] D14503: Windows-specific test for sys::path::remove_dots.

Mike Aizatsky via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 11:39:28 PST 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL252504: Windows-specific test for sys::path::remove_dots. (authored by aizatsky).

Changed prior to commit:
  http://reviews.llvm.org/D14503?vs=39727&id=39728#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14503

Files:
  llvm/trunk/unittests/Support/Path.cpp

Index: llvm/trunk/unittests/Support/Path.cpp
===================================================================
--- llvm/trunk/unittests/Support/Path.cpp
+++ llvm/trunk/unittests/Support/Path.cpp
@@ -853,6 +853,18 @@
 }
 
 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 @@
   SmallString<64> Path1("././c");
   EXPECT_TRUE(path::remove_dots(Path1, true));
   EXPECT_EQ("c", Path1);
+#endif
 }
 } // anonymous namespace


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14503.39728.patch
Type: text/x-patch
Size: 981 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151109/539fc02e/attachment.bin>


More information about the llvm-commits mailing list