diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/completion.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/completion.exp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp index 8797431..b937298 100644 --- a/gdb/testsuite/gdb.base/completion.exp +++ b/gdb/testsuite/gdb.base/completion.exp @@ -734,6 +734,36 @@ gdb_test "cd ${fullsrcdir}" \ "Working directory [string_to_regexp ${fullsrcdir}].*" \ "cd to \${srcdir}" + +# GDB used to fail adding / on directories, on the first try only +send_gdb "dir ../testsu\t" +gdb_expect { + -re "../testsuite/$" { + pass "directory completion" + send_gdb "gdb.bas\t" + } + -re "../testsuite $" { + fail "directory completion (old gdb bug)" + send_gdb "\b/gdb.bas\t" + } + default { + fail "directory completion (timeout)" + send_gdb "\ndir ../testsuite/gdb.bas\t" + } +} + +gdb_expect { + -re "gdb.base/$" { + pass "directory completion 2" + } + timeout { + fail "directory completion 2" + } +} + +gdb_test "\n" "" "Glob remaining of directory test" + + send_gdb "complete file ./gdb.base/compl\n" sleep 1 gdb_expect { |