================ @@ -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) ---------------- labath wrote:
it's a quote, just in case the path contains spaces, backslashes, etc. https://github.com/llvm/llvm-project/pull/93458 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits