After discussions with Jim and Greg, modify the 'watchpoint set' command to become a mutiword command
with subcommand 'expression' and 'variable'. The first subcommand is for supplying an expression to
be evaluated into an address to watch for, while the second is for watching a variable.
'watchpoint set expression' is a raw command, which means that you need to use the "--" option terminator
to end the '-w' or '-x' option processing and to start typing your expression.
Also update several test cases to comply and add a couple of test cases into TestCompletion.py,
in particular, test that 'watchpoint set ex' completes to 'watchpoint set expression ' and that
'watchpoint set var' completes to 'watchpoint set variable '.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150109 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/functionalities/completion/TestCompletion.py b/test/functionalities/completion/TestCompletion.py
index 973bd3c..1af0bb4 100644
--- a/test/functionalities/completion/TestCompletion.py
+++ b/test/functionalities/completion/TestCompletion.py
@@ -26,13 +26,17 @@
"""Test that 'frame variable -w ' completes to ['Available completions:', 'read', 'write', 'read_write']."""
self.complete_from_to('frame variable -w ', ['Available completions:', 'read', 'write', 'read_write'])
- def test_watchpoint_set_dash_x(self):
- """Test that 'watchpoint set -x' completes to 'watchpoint set -x '."""
- self.complete_from_to('watchpoint set -x', 'watchpoint set -x ')
+ def test_watchpoint_set_ex(self):
+ """Test that 'watchpoint set ex' completes to 'watchpoint set expression '."""
+ self.complete_from_to('watchpoint set ex', 'watchpoint set expression ')
- def test_watchpoint_set_dash_w_read_underbar(self):
- """Test that 'watchpoint set -w read_' completes to 'watchpoint set -w read_write'."""
- self.complete_from_to('watchpoint set -w read_', 'watchpoint set -w read_write')
+ def test_watchpoint_set_var(self):
+ """Test that 'watchpoint set var' completes to 'watchpoint set variable '."""
+ self.complete_from_to('watchpoint set var', 'watchpoint set variable ')
+
+ def test_watchpoint_set_variable_dash_w_read_underbar(self):
+ """Test that 'watchpoint set variable -w read_' completes to 'watchpoint set variable -w read_write'."""
+ self.complete_from_to('watchpoint set variable -w read_', 'watchpoint set variable -w read_write')
def test_help_fi(self):
"""Test that 'help fi' completes to ['Available completions:', 'file', 'finish']."""