1 # Copyright (C) 2014-2016 Free Software Foundation, Inc.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 # This testcase tests PR python/16699
20 class CompleteFileInit(gdb
.Command
):
22 gdb
.Command
.__init
__(self
,'completefileinit',gdb
.COMMAND_USER
,gdb
.COMPLETE_FILENAME
)
24 def invoke(self
,argument
,from_tty
):
25 raise gdb
.GdbError('not implemented')
27 class CompleteFileMethod(gdb
.Command
):
29 gdb
.Command
.__init
__(self
,'completefilemethod',gdb
.COMMAND_USER
)
31 def invoke(self
,argument
,from_tty
):
32 raise gdb
.GdbError('not implemented')
34 def complete(self
,text
,word
):
35 return gdb
.COMPLETE_FILENAME
37 class CompleteFileCommandCond(gdb
.Command
):
39 gdb
.Command
.__init
__(self
,'completefilecommandcond',gdb
.COMMAND_USER
)
41 def invoke(self
,argument
,from_tty
):
42 raise gdb
.GdbError('not implemented')
44 def complete(self
,text
,word
):
45 # This is a test made to know if the command
46 # completion still works fine. When the user asks to
47 # complete something like "completefilecommandcond
48 # /path/to/py-completion-t", it should not complete to
49 # "/path/to/py-completion-test/", but instead just
51 if "py-completion-t" in text
:
52 return gdb
.COMPLETE_COMMAND
54 return gdb
.COMPLETE_FILENAME
56 class CompleteLimit1(gdb
.Command
):
58 gdb
.Command
.__init
__(self
,'completelimit1',gdb
.COMMAND_USER
)
60 def invoke(self
,argument
,from_tty
):
61 raise gdb
.GdbError('not implemented')
63 def complete(self
,text
,word
):
64 return ["cl11", "cl12", "cl13"]
66 class CompleteLimit2(gdb
.Command
):
68 gdb
.Command
.__init
__(self
,'completelimit2',
71 def invoke(self
,argument
,from_tty
):
72 raise gdb
.GdbError('not implemented')
74 def complete(self
,text
,word
):
75 return ["cl21", "cl23", "cl25", "cl27", "cl29",
76 "cl22", "cl24", "cl26", "cl28", "cl210"]
78 class CompleteLimit3(gdb
.Command
):
80 gdb
.Command
.__init
__(self
,'completelimit3',
83 def invoke(self
,argument
,from_tty
):
84 raise gdb
.GdbError('not implemented')
86 def complete(self
,text
,word
):
87 return ["cl31", "cl33", "cl35", "cl37", "cl39",
88 "cl32", "cl34", "cl36", "cl38", "cl310"]
90 class CompleteLimit4(gdb
.Command
):
92 gdb
.Command
.__init
__(self
,'completelimit4',
95 def invoke(self
,argument
,from_tty
):
96 raise gdb
.GdbError('not implemented')
98 def complete(self
,text
,word
):
99 return ["cl41", "cl43", "cl45", "cl47", "cl49",
100 "cl42", "cl44", "cl46", "cl48", "cl410"]
102 class CompleteLimit5(gdb
.Command
):
104 gdb
.Command
.__init
__(self
,'completelimit5',
107 def invoke(self
,argument
,from_tty
):
108 raise gdb
.GdbError('not implemented')
110 def complete(self
,text
,word
):
111 return ["cl51", "cl53", "cl55", "cl57", "cl59",
112 "cl52", "cl54", "cl56", "cl58", "cl510"]
114 class CompleteLimit6(gdb
.Command
):
116 gdb
.Command
.__init
__(self
,'completelimit6',
119 def invoke(self
,argument
,from_tty
):
120 raise gdb
.GdbError('not implemented')
122 def complete(self
,text
,word
):
123 return ["cl61", "cl63", "cl65", "cl67", "cl69",
124 "cl62", "cl64", "cl66", "cl68", "cl610"]
126 class CompleteLimit7(gdb
.Command
):
128 gdb
.Command
.__init
__(self
,'completelimit7',
131 def invoke(self
,argument
,from_tty
):
132 raise gdb
.GdbError('not implemented')
134 def complete(self
,text
,word
):
135 return ["cl71", "cl73", "cl75", "cl77", "cl79",
136 "cl72", "cl74", "cl76", "cl78", "cl710"]
140 CompleteFileCommandCond()
This page took 0.033701 seconds and 5 git commands to generate.