2013-09-20 Chung-Lin Tang <cltang@codesourcery.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / filesym.exp
1 # Copyright 2013 Free Software Foundation, Inc.
2 #
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.
7 #
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.
12 #
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/>.
15
16 # This series of completion tests checks the completion output
17 # on a name which is potentially both a symbol name and a file name.
18
19 standard_testfile
20
21 if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
22 return -1
23 }
24
25 # Test completion list for "filesy". We expect the immediate result to
26 # complete to "filesym"; completing again, we expect the symbol name and the
27 # filename (in that order).
28
29 set tst "complete on \"filesy\""
30 send_gdb "break filesy\t"
31 gdb_test_multiple "" $tst {
32 -re "break filesy\\\x07m\$" {
33 pass $tst
34
35 # Now ask for the completion list
36 set tst "completion list for \"filesym\""
37 send_gdb "\t\t"
38 gdb_test_multiple "" $tst {
39 -re "\\\x07\r\nfilesym\[ \t\]+filesym.c\[ \t\]+\r\n$gdb_prompt " {
40 pass $tst
41
42 # Flush the rest of the output by creating the breakpoint.
43 # This ensures this file passes testsuite/12649.
44 send_gdb "\n"
45 gdb_test "" "Breakpoint 1.*" "set breakpoint at filesym"
46 }
47 }
48 }
49 }
50
51 unset -nocomplain tst
This page took 0.031325 seconds and 4 git commands to generate.