[PATCH] D54752: [unittests] Fix ExpandTilde test to match handling home dirs with trailing slash

Simon Atanasyan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 20 13:16:29 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL347346: [unittests] Fix ExpandTilde test to match handling home dirs with trailing slash (authored by atanasyan, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D54752?vs=174756&id=174827#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D54752

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
@@ -543,11 +543,11 @@
     fs::expand_tilde("~", Actual);
     EXPECT_EQ(Expected, Actual);
 
-    path::append(Expected, "foo");
-
 #ifdef _WIN32
+    Expected += "\\foo";
     fs::expand_tilde("~\\foo", Actual);
 #else
+    Expected += "/foo";
     fs::expand_tilde("~/foo", Actual);
 #endif
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54752.174827.patch
Type: text/x-patch
Size: 493 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181120/9a1a9b75/attachment.bin>


More information about the llvm-commits mailing list