2 from lldbsuite.test.lldbtest import *
3 from lldbsuite.test.decorators import *
5 class InvalidArgsCommandTestCase(TestBase):
7 mydir = TestBase.compute_mydir(__file__)
10 def test_script_add(self):
11 self.expect("command script add 1 2", error=True,
12 substrs=["'command script add' requires one argument"])
14 self.expect("command script add", error=True,
15 substrs=["'command script add' requires one argument"])
18 def test_script_clear(self):
19 self.expect("command script clear f", error=True,
20 substrs=["'command script clear' doesn't take any arguments"])
23 def test_script_list(self):
24 self.expect("command script list f", error=True,
25 substrs=["'command script list' doesn't take any arguments"])
28 def test_script_import(self):
29 self.expect("command script import", error=True,
30 substrs=["command script import needs one or more arguments"])
34 self.expect("command alias", error=True,
35 substrs=["'command alias' requires at least two arguments"])
37 self.expect("command alias blub foo", error=True,
38 substrs=["error: invalid command given to 'command alias'. 'foo' does not begin with a valid command. No alias created."])
41 def test_unalias(self):
42 self.expect("command unalias", error=True,
43 substrs=["must call 'unalias' with a valid alias"])
46 def test_delete(self):
47 self.expect("command delete", error=True,
48 substrs=["must call 'command delete' with one or more valid user"])
52 self.expect("command regex", error=True,
53 substrs=["usage: 'command regex <command-name> "])
56 def test_source(self):
57 self.expect("command source", error=True,
58 substrs=["'command source' takes exactly one executable filename argument."])