1 # Copyright (C) 2014-2015 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
58 CompleteFileCommandCond()
This page took 0.046483 seconds and 4 git commands to generate.