[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 19 08:54:44 PST 2024
================
@@ -0,0 +1,69 @@
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+from lldbsuite.test.lldbpexpect import PExpectTest
+
+
+class EditlineCompletionsTest(PExpectTest):
+ @skipIfAsan
+ @skipIfEditlineSupportMissing
+ @skipIfEditlineWideCharSupportMissing
+ def test_completion_truncated(self):
+ """Test that the completion is correctly truncated."""
+ self.launch(dimensions=(10, 20))
+ self.child.send("_regexp-\t")
+ self.child.expect(" _regexp-a...")
+ self.child.expect(" _regexp-b...")
+
+ @skipIfAsan
+ @skipIfEditlineSupportMissing
+ @skipIfEditlineWideCharSupportMissing
+ def test_description_truncated(self):
+ """Test that the description is correctly truncated."""
+ self.launch(dimensions=(10, 70))
+ self.child.send("_regexp-\t")
+ self.child.expect(
+ " _regexp-attach -- Attach to process by ID or name."
+ )
+ self.child.expect(
+ " _regexp-break -- Set a breakpoint using one of several..."
+ )
+
+ @skipIfAsan
+ @skipIfEditlineSupportMissing
+ @skipIfEditlineWideCharSupportMissing
+ def test_separator_omitted(self):
+ """Test that the separated is correctly omitted."""
+ self.launch(dimensions=(10, 32), timeout=1)
----------------
JDevlieghere wrote:
I added this for local testing, I meant to remove it.
https://github.com/llvm/llvm-project/pull/116456
More information about the lldb-commits
mailing list