[Lldb-commits] [lldb] [lldb] Fix module name tab completion (PR #93458)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Tue May 28 05:09:52 PDT 2024
================
@@ -906,3 +906,38 @@ def test_ambiguous_command(self):
def test_ambiguous_subcommand(self):
"""Test completing a subcommand of an ambiguous command"""
self.complete_from_to("settings s ta", [])
+
+ def test_shlib_name(self):
+ self.build()
+ target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
+ self.assertTrue(target, VALID_TARGET)
+ self.registerSharedLibrariesWithTarget(target, ["shared"])
+
+ basenames = []
+ paths = []
+ for m in target.modules:
+ basenames.append(m.file.basename)
+ paths.append(m.file.fullpath)
+
+ # To see all the diffs
+ self.maxDiff = None
+
+ # An empty string completes to everything
+ self.completions_match("target symbols add -s ", basenames + paths)
+
+ # Base name completion
+ self.completions_match("target symbols add -s a.", ["a.out"])
+
+ # Full path completion
+ prefix = os.path.commonpath(paths)
+ self.completions_match("target symbols add -s '" + prefix, paths)
----------------
DavidSpickett wrote:
Is the `'` some kind of escape character?
https://github.com/llvm/llvm-project/pull/93458
More information about the lldb-commits
mailing list