1import lldb
2from lldbsuite.test.lldbtest import *
3from lldbsuite.test.decorators import *
4
5class InvalidArgsLogTestCase(TestBase):
6
7    @no_debug_info_test
8    def test_enable_empty(self):
9        self.expect("log enable", error=True,
10                    substrs=["error: log enable takes a log channel and one or more log types."])
11
12    @no_debug_info_test
13    def test_disable_empty(self):
14        self.expect("log disable", error=True,
15                    substrs=["error: log disable takes a log channel and one or more log types."])
16
17    @no_debug_info_test
18    def test_enable_empty(self):
19        invalid_path = os.path.join("this", "is", "not", "a", "valid", "path")
20        self.expect("log enable lldb all -f " + invalid_path, error=True,
21                    substrs=["Unable to open log file '" + invalid_path + "': ", "\n"])
22