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.
This commit is contained in:
Reid Kleckner
2020-05-04 17:24:59 -07:00
parent c66f89005f
commit 58c7bf246e

View 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)"},