From: Raphael Isemann Date: Thu, 28 Jun 2018 22:40:10 +0000 (+0000) Subject: Fix path completion test case added in rL335905 on Windows X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=517c22041e8e113df030949fae36e1c5c4cab9c4;p=platform%2Fupstream%2Fllvm.git Fix path completion test case added in rL335905 on Windows Summary: The test fails because we don't rewrite the slash behind `foo` to the OS specific separator (as the completion API doesn't support this kind of rewriting). However, we assume that this part of the string is rewritten in the test case, which broke on Windows. Reviewers: stella.stamenova Reviewed By: stella.stamenova Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D48746 llvm-svn: 335934 --- diff --git a/lldb/unittests/Interpreter/TestCompletion.cpp b/lldb/unittests/Interpreter/TestCompletion.cpp index 450f7b2..151ec14 100644 --- a/lldb/unittests/Interpreter/TestCompletion.cpp +++ b/lldb/unittests/Interpreter/TestCompletion.cpp @@ -286,14 +286,12 @@ TEST_F(CompletionTest, DirCompletionUsername) { Count = CommandCompletions::DiskDirectories("~/foo/", Results, Resolver); ASSERT_EQ(1u, Count); ASSERT_EQ(Count, Results.GetSize()); - EXPECT_TRUE(ContainsExactString(Twine("~/foo") + path::get_separator() + - "nested" + path::get_separator(), + EXPECT_TRUE(ContainsExactString(Twine("~/foo/nested") + path::get_separator(), Results)); Count = CommandCompletions::DiskDirectories("~/foo/nes", Results, Resolver); ASSERT_EQ(1u, Count); ASSERT_EQ(Count, Results.GetSize()); - EXPECT_TRUE(ContainsExactString(Twine("~/foo") + path::get_separator() + - "nested" + path::get_separator(), + EXPECT_TRUE(ContainsExactString(Twine("~/foo/nested") + path::get_separator(), Results)); // With ~username syntax it should return one match if there is an exact