Update copyright year range in header of all files managed by GDB
[binutils-gdb.git] / gdb / testsuite / gdb.linespec / errors.exp
blob7f91ef0796f53910789cbfa1013b1376236d8548
1 # Copyright 2011-2023 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 # Linespec tests
18 # We don't currently need our own test case for testing, so grab
19 # another one.
21 if {[prepare_for_testing "failed to prepare" linespecs keywords.c]} {
22   return -1
25 # PR gdb/12843
26 gdb_test "list c:/foo/bar/baz.c:1" "No source file named c:/foo/bar/baz.c."
27 gdb_test "list c:/foo/bar/baz.c" "Function \"c:/foo/bar/baz.c\" not defined."
28 gdb_test "list fooc:/foo/bar/baz.c:1" "No source file named fooc."
29 gdb_test "list fooc:/foo/bar/baz.c" "No source file named fooc."
31 # PR cli/28665, gdb/28797
32 save_vars { env(EDITOR) } {
33     setenv EDITOR true
35     foreach cmd {list edit} {
36         gdb_test "${cmd} task 123" \
37             "Junk at end of line specification\\."
38         gdb_test "${cmd} if (0)" \
39             "Junk at end of line specification\\."
40         gdb_test "${cmd} thread 1" \
41             "Junk at end of line specification\\."
42         gdb_test "${cmd} -force-condition" \
43             "Junk at end of line specification\\."
44         gdb_test "${cmd} ,," \
45             "Junk at end of line specification\\."
46     }