diff options
| author | Kate Stone <katherine.stone@apple.com> | 2016-09-06 20:57:50 +0000 |
|---|---|---|
| committer | Kate Stone <katherine.stone@apple.com> | 2016-09-06 20:57:50 +0000 |
| commit | b9c1b51e45b845debb76d8658edabca70ca56079 (patch) | |
| tree | dfcb5a13ef2b014202340f47036da383eaee74aa /lldb/packages/Python/lldbsuite/test/functionalities/command_history | |
| parent | d5aa73376966339caad04013510626ec2e42c760 (diff) | |
| download | bcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.tar.gz bcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.zip | |
*** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style. This kind of mass change has
*** two obvious implications:
Firstly, merging this particular commit into a downstream fork may be a huge
effort. Alternatively, it may be worth merging all changes up to this commit,
performing the same reformatting operation locally, and then discarding the
merge for this particular commit. The commands used to accomplish this
reformatting were as follows (with current working directory as the root of
the repository):
find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} +
find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ;
The version of clang-format used was 3.9.0, and autopep8 was 1.2.4.
Secondly, “blame” style tools will generally point to this commit instead of
a meaningful prior commit. There are alternatives available that will attempt
to look through this change and find the appropriate prior commit. YMMV.
llvm-svn: 280751
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/command_history')
| -rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/command_history/TestCommandHistory.py | 138 |
1 files changed, 88 insertions, 50 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/command_history/TestCommandHistory.py b/lldb/packages/Python/lldbsuite/test/functionalities/command_history/TestCommandHistory.py index 66ba8d07622..17b7b6d395d 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/command_history/TestCommandHistory.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/command_history/TestCommandHistory.py @@ -5,13 +5,13 @@ Test the command history mechanism from __future__ import print_function - import os import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil + class CommandHistoryTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @@ -19,52 +19,90 @@ class CommandHistoryTestCase(TestBase): @no_debug_info_test def test_history(self): self.runCmd('command history --clear', inHistory=False) - self.runCmd('breakpoint list', check=False, inHistory=True) #0 - self.runCmd('register read', check=False, inHistory=True) #1 - self.runCmd('apropos hello', check=False, inHistory=True) #2 - self.runCmd('memory write', check=False, inHistory=True) #3 - self.runCmd('log list', check=False, inHistory=True) #4 - self.runCmd('disassemble', check=False, inHistory=True) #5 - self.runCmd('expression 1', check=False, inHistory=True) #6 - self.runCmd('type summary list -w default', check=False, inHistory=True) #7 - self.runCmd('version', check=False, inHistory=True) #8 - self.runCmd('frame select 1', check=False, inHistory=True) #9 - - self.expect ("command history -s 3 -c 3", inHistory=True, - substrs = ['3: memory write','4: log list','5: disassemble']) - - self.expect ("command history -s 3 -e 3", inHistory=True, - substrs = ['3: memory write']) - - self.expect ("command history -s 6 -e 7", inHistory=True, - substrs = ['6: expression 1','7: type summary list -w default']) - - self.expect ("command history -c 2", inHistory=True, - substrs = ['0: breakpoint list','1: register read']) - - self.expect ("command history -e 3 -c 1", inHistory=True, - substrs = ['3: memory write']) - - self.expect ("command history -e 2", inHistory=True, - substrs = ['0: breakpoint list','1: register read','2: apropos hello']) - - self.expect ("command history -s 12", inHistory=True, - substrs = ['12: command history -s 6 -e 7','13: command history -c 2','14: command history -e 3 -c 1','15: command history -e 2','16: command history -s 12']) - - self.expect ("command history -s end -c 3", inHistory=True, - substrs = ['15: command history -e 2','16: command history -s 12','17: command history -s end -c 3']) - - self.expect ("command history -s end -e 15", inHistory=True, - substrs = ['15: command history -e 2','16: command history -s 12','17: command history -s end -c 3','command history -s end -e 15']) - - self.expect ("command history -s 5 -c 1", inHistory=True, - substrs = ['5: disassemble']) - - self.expect ("command history -c 1 -s 5", inHistory=True, - substrs = ['5: disassemble']) - - self.expect ("command history -c 1 -e 3", inHistory=True, - substrs = ['3: memory write']) - - self.expect ("command history -c 1 -e 3 -s 5",error=True, inHistory=True, - substrs = ['error: --count, --start-index and --end-index cannot be all specified in the same invocation']) + self.runCmd('breakpoint list', check=False, inHistory=True) # 0 + self.runCmd('register read', check=False, inHistory=True) # 1 + self.runCmd('apropos hello', check=False, inHistory=True) # 2 + self.runCmd('memory write', check=False, inHistory=True) # 3 + self.runCmd('log list', check=False, inHistory=True) # 4 + self.runCmd('disassemble', check=False, inHistory=True) # 5 + self.runCmd('expression 1', check=False, inHistory=True) # 6 + self.runCmd( + 'type summary list -w default', + check=False, + inHistory=True) # 7 + self.runCmd('version', check=False, inHistory=True) # 8 + self.runCmd('frame select 1', check=False, inHistory=True) # 9 + + self.expect( + "command history -s 3 -c 3", + inHistory=True, + substrs=[ + '3: memory write', + '4: log list', + '5: disassemble']) + + self.expect("command history -s 3 -e 3", inHistory=True, + substrs=['3: memory write']) + + self.expect( + "command history -s 6 -e 7", + inHistory=True, + substrs=[ + '6: expression 1', + '7: type summary list -w default']) + + self.expect("command history -c 2", inHistory=True, + substrs=['0: breakpoint list', '1: register read']) + + self.expect("command history -e 3 -c 1", inHistory=True, + substrs=['3: memory write']) + + self.expect( + "command history -e 2", + inHistory=True, + substrs=[ + '0: breakpoint list', + '1: register read', + '2: apropos hello']) + + self.expect( + "command history -s 12", + inHistory=True, + substrs=[ + '12: command history -s 6 -e 7', + '13: command history -c 2', + '14: command history -e 3 -c 1', + '15: command history -e 2', + '16: command history -s 12']) + + self.expect( + "command history -s end -c 3", + inHistory=True, + substrs=[ + '15: command history -e 2', + '16: command history -s 12', + '17: command history -s end -c 3']) + + self.expect( + "command history -s end -e 15", + inHistory=True, + substrs=[ + '15: command history -e 2', + '16: command history -s 12', + '17: command history -s end -c 3', + 'command history -s end -e 15']) + + self.expect("command history -s 5 -c 1", inHistory=True, + substrs=['5: disassemble']) + + self.expect("command history -c 1 -s 5", inHistory=True, + substrs=['5: disassemble']) + + self.expect("command history -c 1 -e 3", inHistory=True, + substrs=['3: memory write']) + + self.expect( + "command history -c 1 -e 3 -s 5", + error=True, + inHistory=True, + substrs=['error: --count, --start-index and --end-index cannot be all specified in the same invocation']) |

