This is currently being done in an ad hoc way, and so for some commands it isn't being checked. We have the info to make this check, since commands are supposed to add their arguments to the m_arguments field of the CommandObject. This change uses that info to check whether the command received arguments in error. A handful of commands weren't defining their argument types, I also had to fix them. And a bunch of commands were checking for arguments by hand, so I removed those checks in favor of the CommandObject one. That also meant I had to change some tests that were checking for the ad hoc error outputs. Differential Revision: https://reviews.llvm.org/D128453
12 lines
347 B
Python
12 lines
347 B
Python
import lldb
|
|
from lldbsuite.test.lldbtest import *
|
|
from lldbsuite.test.decorators import *
|
|
|
|
class GuiTestCase(TestBase):
|
|
|
|
@no_debug_info_test
|
|
@skipIfCursesSupportMissing
|
|
def test_reproducer_generate_invalid_invocation(self):
|
|
self.expect("gui blub", error=True,
|
|
substrs=["'gui' doesn't take any arguments."])
|