Commit | Line | Data |
---|---|---|
88b9d363 | 1 | # Copyright 2021-2022 Free Software Foundation, Inc. |
2840a186 TV |
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 | # Check that loading an existing but non-executable file | |
17 | # results in the correct error message. | |
18 | ||
19 | set binfile "$srcdir/$subdir/$gdb_test_file_name.exp" | |
20 | ||
21 | clean_restart | |
22 | ||
23 | set re \ | |
24 | [list \ | |
25 | "\"[string_to_regexp $binfile]\"" \ | |
26 | "not in executable format" \ | |
27 | "file format not recognized"] | |
28 | set re [join $re ": "] | |
29 | ||
30 | # Using gdb_load will generate a dejagnu ERROR, so use | |
31 | # plain file command instead. | |
32 | gdb_test "file $binfile" $re "error message" |