a34c3a7245d717b0ff4377adeacf1bc0a72ad024
1 # Copyright (C) 2014-2021 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
21 class CompleteFileInit(gdb
.Command
):
24 self
, "completefileinit", gdb
.COMMAND_USER
, gdb
.COMPLETE_FILENAME
27 def invoke(self
, argument
, from_tty
):
28 raise gdb
.GdbError("not implemented")
31 class CompleteFileMethod(gdb
.Command
):
33 gdb
.Command
.__init
__(self
, "completefilemethod", gdb
.COMMAND_USER
)
35 def invoke(self
, argument
, from_tty
):
36 raise gdb
.GdbError("not implemented")
38 def complete(self
, text
, word
):
39 return gdb
.COMPLETE_FILENAME
42 class CompleteFileCommandCond(gdb
.Command
):
44 gdb
.Command
.__init
__(self
, "completefilecommandcond", gdb
.COMMAND_USER
)
46 def invoke(self
, argument
, from_tty
):
47 raise gdb
.GdbError("not implemented")
49 def complete(self
, text
, word
):
50 # This is a test made to know if the command
51 # completion still works fine. When the user asks to
52 # complete something like "completefilecommandcond
53 # /path/to/py-completion-t", it should not complete to
54 # "/path/to/py-completion-test/", but instead just
56 if "py-completion-t" in text
:
57 return gdb
.COMPLETE_COMMAND
59 return gdb
.COMPLETE_FILENAME
62 class CompleteLimit1(gdb
.Command
):
64 gdb
.Command
.__init
__(self
, "completelimit1", gdb
.COMMAND_USER
)
66 def invoke(self
, argument
, from_tty
):
67 raise gdb
.GdbError("not implemented")
69 def complete(self
, text
, word
):
70 return ["cl11", "cl12", "cl13"]
73 class CompleteLimit2(gdb
.Command
):
75 gdb
.Command
.__init
__(self
, "completelimit2", gdb
.COMMAND_USER
)
77 def invoke(self
, argument
, from_tty
):
78 raise gdb
.GdbError("not implemented")
80 def complete(self
, text
, word
):
95 class CompleteLimit3(gdb
.Command
):
97 gdb
.Command
.__init
__(self
, "completelimit3", gdb
.COMMAND_USER
)
99 def invoke(self
, argument
, from_tty
):
100 raise gdb
.GdbError("not implemented")
102 def complete(self
, text
, word
):
117 class CompleteLimit4(gdb
.Command
):
119 gdb
.Command
.__init
__(self
, "completelimit4", gdb
.COMMAND_USER
)
121 def invoke(self
, argument
, from_tty
):
122 raise gdb
.GdbError("not implemented")
124 def complete(self
, text
, word
):
139 class CompleteLimit5(gdb
.Command
):
141 gdb
.Command
.__init
__(self
, "completelimit5", gdb
.COMMAND_USER
)
143 def invoke(self
, argument
, from_tty
):
144 raise gdb
.GdbError("not implemented")
146 def complete(self
, text
, word
):
161 class CompleteLimit6(gdb
.Command
):
163 gdb
.Command
.__init
__(self
, "completelimit6", gdb
.COMMAND_USER
)
165 def invoke(self
, argument
, from_tty
):
166 raise gdb
.GdbError("not implemented")
168 def complete(self
, text
, word
):
183 class CompleteLimit7(gdb
.Command
):
185 gdb
.Command
.__init
__(self
, "completelimit7", gdb
.COMMAND_USER
)
187 def invoke(self
, argument
, from_tty
):
188 raise gdb
.GdbError("not implemented")
190 def complete(self
, text
, word
):
207 CompleteFileCommandCond()
This page took 0.033268 seconds and 3 git commands to generate.