Skip to content

Commit dbabad0

Browse files
authored
[lldb] Use validation combination of options in TestAbbreviations (#125270)
Name and line number are part of different option groups and are not compatible. ``` (lldb) breakpoint set -n foo -l 10 error: invalid combination of options for the given command ``` The help output for `breakpoint set` confirms this. This patch updates the test to use two compatible options. With the improved error reporting from #125125 this becomes an issue.
1 parent 2a2d6e6 commit dbabad0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lldb/test/API/functionalities/abbreviation/TestAbbreviations.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ def test_command_abbreviations_and_aliases(self):
4545

4646
# Make sure an unabbreviated command is not mangled.
4747
command_interpreter.ResolveCommand(
48-
"breakpoint set --name main --line 123", result
48+
"breakpoint set --name main --ignore-count 123", result
4949
)
5050
self.assertTrue(result.Succeeded())
51-
self.assertEqual("breakpoint set --name main --line 123", result.GetOutput())
51+
self.assertEqual(
52+
"breakpoint set --name main --ignore-count 123", result.GetOutput()
53+
)
5254

5355
# Create some aliases.
5456
self.runCmd("com a alias com al")
@@ -72,10 +74,10 @@ def test_command_abbreviations_and_aliases(self):
7274
"process launch -s -o /dev/tty0 -e /dev/tty0", result.GetOutput()
7375
)
7476

75-
self.runCmd("alias xyzzy breakpoint set -n %1 -l %2")
77+
self.runCmd("alias xyzzy breakpoint set -n %1 -i %2")
7678
command_interpreter.ResolveCommand("xyzzy main 123", result)
7779
self.assertTrue(result.Succeeded())
78-
self.assertEqual("breakpoint set -n main -l 123", result.GetOutput().strip())
80+
self.assertEqual("breakpoint set -n main -i 123", result.GetOutput().strip())
7981

8082
# And again, without enough parameters.
8183
command_interpreter.ResolveCommand("xyzzy main", result)

0 commit comments

Comments
 (0)