1import lldb 2from lldbsuite.test.lldbtest import * 3from lldbsuite.test.decorators import * 4 5class InvalidArgsCommandTestCase(TestBase): 6 7 @no_debug_info_test 8 def test_script_add(self): 9 self.expect("command script add 1 2", error=True, 10 substrs=["Path component: '1' not found"]) 11 12 self.expect("command script add", error=True, 13 substrs=["'command script add' requires at least one argument"]) 14 15 @no_debug_info_test 16 def test_script_clear(self): 17 self.expect("command script clear f", error=True, 18 substrs=["'command script clear' doesn't take any arguments"]) 19 20 @no_debug_info_test 21 def test_script_list(self): 22 self.expect("command script list f", error=True, 23 substrs=["'command script list' doesn't take any arguments"]) 24 25 @no_debug_info_test 26 def test_script_import(self): 27 self.expect("command script import", error=True, 28 substrs=["command script import needs one or more arguments"]) 29 30 @no_debug_info_test 31 def test_alias(self): 32 self.expect("command alias", error=True, 33 substrs=["'command alias' requires at least two arguments"]) 34 35 self.expect("command alias blub foo", error=True, 36 substrs=["error: invalid command given to 'command alias'. 'foo' does not begin with a valid command. No alias created."]) 37 38 @no_debug_info_test 39 def test_unalias(self): 40 self.expect("command unalias", error=True, 41 substrs=["must call 'unalias' with a valid alias"]) 42 43 @no_debug_info_test 44 def test_delete(self): 45 self.expect("command delete", error=True, 46 substrs=["must call 'command delete' with one or more valid user"]) 47 48 @no_debug_info_test 49 def test_regex(self): 50 self.expect("command regex", error=True, 51 substrs=["usage: 'command regex <command-name> "]) 52 53 @no_debug_info_test 54 def test_source(self): 55 self.expect("command source", error=True, 56 substrs=["'command source' takes exactly one executable filename argument."]) 57