Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ def test_command_abbreviations_and_aliases(self):

# Make sure an unabbreviated command is not mangled.
command_interpreter.ResolveCommand(
"breakpoint set --name main --line 123", result
"breakpoint set --name main --ignore-count 123", result
)
self.assertTrue(result.Succeeded())
self.assertEqual("breakpoint set --name main --line 123", result.GetOutput())
self.assertEqual(
"breakpoint set --name main --ignore-count 123", result.GetOutput()
)

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

self.runCmd("alias xyzzy breakpoint set -n %1 -l %2")
self.runCmd("alias xyzzy breakpoint set -n %1 -i %2")
command_interpreter.ResolveCommand("xyzzy main 123", result)
self.assertTrue(result.Succeeded())
self.assertEqual("breakpoint set -n main -l 123", result.GetOutput().strip())
self.assertEqual("breakpoint set -n main -i 123", result.GetOutput().strip())

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