-#
-# Note that if we are building in the source tree, then there will be
-# more than one completion for ./Make, so we need to handle that also.
-# A better long term solution might be to create a temporary directory,
-# populate it with a set of known names, and use that directory to
-# test completions.
-
-gdb_test "cd ${objdir}" "Working directory ${objdir}.*" "cd to \${objdir}"
-send_gdb "file ./Make\t"
-sleep 1
-gdb_expect {
- -re "^file ./Make(\\\x07|)file.*$"\
- { send_gdb "\n"
- gdb_expect {
- -re "\r\nA program is being debugged already\\. Kill it\\? \\(y or n\\) $"\
- { send_gdb "n\n"
- gdb_expect {
- -re "\r\nProgram not killed\\.\r\n$gdb_prompt $"\
- { pass "complete 'file ./Make'"}
- -re ".*$gdb_prompt $" { fail "complete 'file ./Make'"}
- timeout {fail "(timeout) complete 'file ./Make'"}
- }
- }
- -re ".*$gdb_prompt $" { fail "complete 'file ./Make'"}
- timeout {fail "(timeout) complete 'file ./Make'"}
- }
- }
- -re ".*$gdb_prompt $" { fail "complete 'file ./Make'" }
- timeout { fail "(timeout) complete 'file ./Make'" }
- }