diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/filename-completion.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/filename-completion.exp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.base/filename-completion.exp b/gdb/testsuite/gdb.base/filename-completion.exp index 03ead59..cb3fc90 100644 --- a/gdb/testsuite/gdb.base/filename-completion.exp +++ b/gdb/testsuite/gdb.base/filename-completion.exp @@ -1,4 +1,4 @@ -# Copyright 2024 Free Software Foundation, Inc. +# Copyright 2024-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -381,11 +381,15 @@ proc run_mid_line_completion_tests { root cmd } { proc run_quoting_and_escaping_tests { root } { # Test all the commands which allow quoting of filenames, and # which require whitespace to be escaped in unquoted filenames. - foreach_with_prefix cmd { file exec-file symbol-file add-symbol-file \ - remove-symbol-file \ - "target core" "target exec" "target tfile" \ - "maint print c-tdesc" "compile file" \ - "save gdb-index" "save gdb-index -dwarf-5" } { + set all_cmds { file exec-file symbol-file add-symbol-file \ + remove-symbol-file \ + "target core" "target exec" "target tfile" \ + "maint print c-tdesc" "save gdb-index" + "save gdb-index -dwarf-5" } + if { [allow_compile_tests] } { + lappend all_cmds "compile file" + } + foreach_with_prefix cmd $all_cmds { # Try each test placing the filename as the first argument # then again with a quoted string immediately after the # command. This works because the filename completer will |