Update LLDB filespec tests for remove_dots change
authorReid Kleckner <rnk@google.com>
Tue, 5 May 2020 00:24:59 +0000 (17:24 -0700)
committerReid Kleckner <rnk@google.com>
Tue, 5 May 2020 00:27:16 +0000 (17:27 -0700)
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.

lldb/unittests/Utility/FileSpecTest.cpp

index 690c5ae..ad2e328 100644 (file)
@@ -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)"},