Skip to content

Commit

Permalink
Add the actually calculated completions to COMPLETION_MSG
Browse files Browse the repository at this point in the history
Summary: Otherwise this assertion message is not very useful to whoever is reading the log.

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D49947

llvm-svn: 338179
  • Loading branch information
Teemperor committed Jul 27, 2018
1 parent 2f6a101 commit 7bb4de4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Expand Up @@ -313,8 +313,8 @@ def complete_from_to(self, str_input, patterns, turn_off_re_match=False):
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])
5 changes: 3 additions & 2 deletions lldb/packages/Python/lldbsuite/test/lldbtest.py
Expand Up @@ -184,9 +184,10 @@ def CMD_MSG(str):
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):
Expand Down

0 comments on commit 7bb4de4

Please sign in to comment.