aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test/lldbtest.py
diff options
context:
space:
mode:
authorEly Ronnen <elyronnen@gmail.com>2025-04-24 00:01:03 +0200
committerGitHub <noreply@github.com>2025-04-23 15:01:03 -0700
commit6f5b98b3247969eb85135141bdae4a2d6aeb284a (patch)
tree1cd24a170248cb58813cdb2360015f36f36cb55e /lldb/packages/Python/lldbsuite/test/lldbtest.py
parentcef9ed56f8c19258f8805512e58627c5bc79bf98 (diff)
downloadllvm-6f5b98b3247969eb85135141bdae4a2d6aeb284a.zip
llvm-6f5b98b3247969eb85135141bdae4a2d6aeb284a.tar.gz
llvm-6f5b98b3247969eb85135141bdae4a2d6aeb284a.tar.bz2
[lldb] returning command completions up to a maximum (#135565)
- Adding `max_return_elements` field to `CompletionRequest`. - adding maximum checks to `SymbolCompleter` and `SourceFileCompleter`. Fixes #135553
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbtest.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbtest.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index db15a1d..763e061 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -2257,12 +2257,12 @@ class TestBase(Base, metaclass=LLDBTestCaseFactory):
substrs=[p],
)
- def completions_match(self, command, completions):
+ def completions_match(self, command, completions, max_completions=-1):
"""Checks that the completions for the given command are equal to the
given list of completions"""
interp = self.dbg.GetCommandInterpreter()
match_strings = lldb.SBStringList()
- interp.HandleCompletion(command, len(command), 0, -1, match_strings)
+ interp.HandleCompletion(command, len(command), 0, max_completions, match_strings)
# match_strings is a 1-indexed list, so we have to slice...
self.assertCountEqual(
completions, list(match_strings)[1:], "List of returned completion is wrong"