return -1
}
+set tui_supported_p [expr ![skip_tui_tests]]
+
# Check the completion result, as returned by the "maintenance show
# test-options-completion-result" command. TEST is used as test name.
proc check_completion_result {expected test} {
# Basic option-machinery + "frame apply" command integration tests.
proc_with_prefix test-frame-apply {} {
+ global tui_supported_p
+
test_gdb_complete_unique "frame apply all" "frame apply all"
gdb_test "frame apply level 0-" \
test_gdb_completion_offers_commands "$cmd -- "
}
- # '-' is a valid TUI command.
- test_error_cmd2 $cmd " -- -" \
- "Cannot enable the TUI when output is not a terminal"
- test_gdb_complete_unique \
- "$cmd -- -" \
- "$cmd -- -"
+ if { $tui_supported_p } {
+ # '-' is a valid TUI command.
+ test_error_cmd2 $cmd " -- -" \
+ "Cannot enable the TUI when output is not a terminal"
+ test_gdb_complete_unique \
+ "$cmd -- -" \
+ "$cmd -- -"
+ }
test_error_cmd2 $cmd " -foo" \
"Undefined command: \"-foo\". Try \"help\"\\."
# Basic option-machinery + "thread apply" command integration tests.
proc_with_prefix test-thread-apply {} {
+ global tui_supported_p
test_gdb_complete_unique "thread apply all" "thread apply all"
test_gdb_complete_unique "taas" "taas"
test_gdb_completion_offers_commands "$cmd -- "
}
- # '-' is a valid TUI command.
- test_invalid_cmd "$cmd" " -- -" \
- "Cannot enable the TUI when output is not a terminal"
- test_gdb_complete_unique \
- "$cmd -- -" \
- "$cmd -- -"
+ if { $tui_supported_p } {
+ # '-' is a valid TUI command.
+ test_invalid_cmd "$cmd" " -- -" \
+ "Cannot enable the TUI when output is not a terminal"
+ test_gdb_complete_unique \
+ "$cmd -- -" \
+ "$cmd -- -"
+ }
test_invalid_cmd $cmd " -foo" \
"Undefined command: \"-foo\". Try \"help\"\\."