[Lldb-commits] [lldb] 58c7bf2 - Update LLDB filespec tests for remove_dots change

Reid Kleckner via lldb-commits lldb-commits at lists.llvm.org
Mon May 4 17:27:23 PDT 2020


Author: Reid Kleckner
Date: 2020-05-04T17:27:16-07:00
New Revision: 58c7bf246ec4056ca40ea37f16cb3314161863f7

URL: https://github.com/llvm/llvm-project/commit/58c7bf246ec4056ca40ea37f16cb3314161863f7
DIFF: https://github.com/llvm/llvm-project/commit/58c7bf246ec4056ca40ea37f16cb3314161863f7.diff

LOG: Update LLDB filespec tests for remove_dots change

It looks like the new implementation is correct, since there were TODOs
here about getting the new behavior.

I am not sure if "C:..\.." should become "C:" or "C:\", though. The new
output doesn't precisely match the TODO message, but it seems
appropriate given the specification of remove_dots and how .. traversals
work at the root directory.

Added: 
    

Modified: 
    lldb/unittests/Utility/FileSpecTest.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/unittests/Utility/FileSpecTest.cpp b/lldb/unittests/Utility/FileSpecTest.cpp
index 690c5ae331ee..ad2e328ce82f 100644
--- a/lldb/unittests/Utility/FileSpecTest.cpp
+++ b/lldb/unittests/Utility/FileSpecTest.cpp
@@ -246,13 +246,11 @@ TEST(FileSpecTest, GetPath) {
       {R"(\\net)", R"(\\net)"},
       {R"(c:\..)", R"(c:\)"},
       {R"(c:\.)", R"(c:\)"},
-      // TODO: fix llvm::sys::path::remove_dots() to return "\" below.
-      {R"(\..)", R"(\..)"},
+      {R"(\..)", R"(\)"},
       //      {R"(c:..)", R"(c:..)"},
       {R"(..)", R"(..)"},
       {R"(.)", R"(.)"},
-      // TODO: fix llvm::sys::path::remove_dots() to return "c:\" below.
-      {R"(c:..\..)", R"(c:\..\..)"},
+      {R"(c:..\..)", R"(c:)"},
       {R"(..\..)", R"(..\..)"},
       {R"(foo\..)", R"(.)"},
       {R"(foo\..\bar)", R"(bar)"},


        


More information about the lldb-commits mailing list