forked from OSchip/llvm-project
[lldb] Test and fix invalid log command invocations
llvm-svn: 370619
This commit is contained in:
parent
d63ddee5ab
commit
434b81d0a2
|
@ -0,0 +1,25 @@
|
|||
import lldb
|
||||
from lldbsuite.test.lldbtest import *
|
||||
from lldbsuite.test.decorators import *
|
||||
|
||||
class InvalidArgsLogTestCase(TestBase):
|
||||
|
||||
mydir = TestBase.compute_mydir(__file__)
|
||||
|
||||
def setUp(self):
|
||||
TestBase.setUp(self)
|
||||
|
||||
@no_debug_info_test
|
||||
def test_enable_empty(self):
|
||||
self.expect("log enable", error=True,
|
||||
substrs=["error: log enable takes a log channel and one or more log types."])
|
||||
|
||||
@no_debug_info_test
|
||||
def test_disable_empty(self):
|
||||
self.expect("log disable", error=True,
|
||||
substrs=["error: log disable takes a log channel and one or more log types."])
|
||||
|
||||
@no_debug_info_test
|
||||
def test_timer_empty(self):
|
||||
self.expect("log timer", error=True,
|
||||
substrs=["error: Missing subcommand"])
|
|
@ -140,6 +140,7 @@ protected:
|
|||
result.AppendErrorWithFormat(
|
||||
"%s takes a log channel and one or more log types.\n",
|
||||
m_cmd_name.c_str());
|
||||
result.SetStatus(eReturnStatusFailed);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -207,6 +208,7 @@ protected:
|
|||
result.AppendErrorWithFormat(
|
||||
"%s takes a log channel and one or more log types.\n",
|
||||
m_cmd_name.c_str());
|
||||
result.SetStatus(eReturnStatusFailed);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue