Automatic date update in version.in
[binutils-gdb/blckswan.git] / gdb / testsuite / gdb.trace / mi-trace-save.exp
blobe556e61884e579774821e97b59ab7485116a12fb
1 # Copyright 2016-2022 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 # The -trace-save command is already tested in other files (e.g.
17 # mi-trace-frame-collected.exp), so this file currently only tests the error
18 # cases of -trace-save.
20 load_lib mi-support.exp
22 mi_gdb_start
24 # Test with the wrong number of arguments.
26 proc test_trace_save_wrong_num_args { } {
27 set err_re [string_to_regexp "^error,msg=\"Exactly one argument required (file in which to save trace data)\""]
29 mi_gdb_test "-trace-save" "$err_re" "-trace-save with missing argument"
30 mi_gdb_test "-trace-save a b" "$err_re" "-trace-save with too many arguments"
33 # Test with an unrecognized option.
35 proc test_trace_save_wrong_opt { } {
36 set err_re [string_to_regexp "^error,msg=\"-trace-save: Unknown option ``hey''\""]
38 mi_gdb_test "-trace-save -hey" "$err_re" "-trace-save with wrong option"
41 test_trace_save_wrong_num_args
42 test_trace_save_wrong_opt