2 Test some lldb command abbreviations to make sure the common short spellings of
3 many commands remain available even after we add/delete commands in the future.
9 from lldbsuite.test.decorators import *
10 from lldbsuite.test.lldbtest import *
11 from lldbsuite.test import lldbutil
14 class CommonShortSpellingsTestCase(TestBase):
16 mydir = TestBase.compute_mydir(__file__)
19 def test_abbrevs2(self):
20 command_interpreter = self.dbg.GetCommandInterpreter()
21 self.assertTrue(command_interpreter, VALID_COMMAND_INTERPRETER)
22 result = lldb.SBCommandReturnObject()
25 ('br s', 'breakpoint set'),
26 ('disp', '_regexp-display'), # a.k.a., 'display'
27 ('di', 'disassemble'),
28 ('dis', 'disassemble'),
29 ('ta st a', 'target stop-hook add'),
30 ('fr v', 'frame variable'),
31 ('f 1', 'frame select 1'),
32 ('ta st li', 'target stop-hook list'),
35 for (short_val, long_val) in abbrevs:
36 command_interpreter.ResolveCommand(short_val, result)
37 self.assertTrue(result.Succeeded())
38 self.assertEqual(long_val, result.GetOutput())