teemperor created this revision.
teemperor added a reviewer: stella.stamenova.

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.


https://reviews.llvm.org/D48746

Files:
  unittests/Interpreter/TestCompletion.cpp


Index: unittests/Interpreter/TestCompletion.cpp
===================================================================
--- unittests/Interpreter/TestCompletion.cpp
+++ unittests/Interpreter/TestCompletion.cpp
@@ -286,14 +286,12 @@
   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


Index: unittests/Interpreter/TestCompletion.cpp
===================================================================
--- unittests/Interpreter/TestCompletion.cpp
+++ unittests/Interpreter/TestCompletion.cpp
@@ -286,14 +286,12 @@
   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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to