diff options
author | Jim Ingham <jingham@apple.com> | 2022-08-31 10:13:05 -0700 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2022-09-13 11:02:47 -0700 |
commit | 6c089b2af5d8d98f66b27b67f70958f520820a76 (patch) | |
tree | 575e84076bd5fa53e04744d3c54b1be35a9e8e13 /lldb/packages/Python/lldbsuite/test/lldbtest.py | |
parent | bfc550a361f0c93fb81bfd8e37b07515696e9ee0 (diff) | |
download | llvm-6c089b2af5d8d98f66b27b67f70958f520820a76.zip llvm-6c089b2af5d8d98f66b27b67f70958f520820a76.tar.gz llvm-6c089b2af5d8d98f66b27b67f70958f520820a76.tar.bz2 |
Be more careful to maintain quoting information when parsing commands.
This is particularly a problem for alias construction, where you might
want to have a backtick surrounded option in the alias. Before this
patch:
command alias expression -Z \`argc\` -- argv
for instance would be rendered as:
expression -Z argc -- argv
and would fail to work.
Differential Revision: https://reviews.llvm.org/D133045
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbtest.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lldbtest.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index 101921f..5c05876 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -2472,6 +2472,13 @@ FileCheck output: self.fail(self._formatMessage(msg, "'{}' is not success".format(error))) + """Assert that a command return object is successful""" + def assertCommandReturn(self, obj, msg=None): + if not obj.Succeeded(): + error = obj.GetError() + self.fail(self._formatMessage(msg, + "'{}' is not success".format(error))) + """Assert two states are equal""" def assertState(self, first, second, msg=None): if first != second: |