[Lldb-commits] [PATCH] D49947: Add the actually calculated completions to COMPLETION_MSG
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jul 27 16:23:25 PDT 2018
teemperor created this revision.
Otherwise this assertion message is not very useful to whoever is reading the log.
https://reviews.llvm.org/D49947
Files:
packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py
packages/Python/lldbsuite/test/lldbtest.py
Index: packages/Python/lldbsuite/test/lldbtest.py
===================================================================
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -184,9 +184,9 @@
return "Command '%s' returns successfully" % str
-def COMPLETION_MSG(str_before, str_after):
+def COMPLETION_MSG(str_before, str_after, completions):
'''A generic message generator for the completion mechanism.'''
- return "'%s' successfully completes to '%s'" % (str_before, str_after)
+ return "'%s' successfully completes to '%s', but completions were:\n%s" % (str_before, str_after, "\n".join(completions))
def EXP_MSG(str, actual, exe):
Index: packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py
===================================================================
--- packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py
+++ packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py
@@ -273,8 +273,8 @@
if turn_off_re_match:
self.expect(
compare_string, msg=COMPLETION_MSG(
- str_input, p), exe=False, substrs=[p])
+ str_input, p, match_strings), exe=False, substrs=[p])
else:
self.expect(
compare_string, msg=COMPLETION_MSG(
- str_input, p), exe=False, patterns=[p])
+ str_input, p, match_strings), exe=False, patterns=[p])
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49947.157800.patch
Type: text/x-patch
Size: 1546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180727/9977d498/attachment.bin>
More information about the lldb-commits
mailing list