diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-06-30 21:33:20 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-06-30 21:33:20 +0000 |
commit | 40974f9158c1d13db4161ce1ce71fc6fd011d675 (patch) | |
tree | c23aaab5f6034b956935fe42953ad741852c21bb /gdb | |
parent | e6f9de8791eced5ebe0dde5a06bd4b132757fe1a (diff) | |
download | fsf-binutils-gdb-40974f9158c1d13db4161ce1ce71fc6fd011d675.zip fsf-binutils-gdb-40974f9158c1d13db4161ce1ce71fc6fd011d675.tar.gz fsf-binutils-gdb-40974f9158c1d13db4161ce1ce71fc6fd011d675.tar.bz2 |
gdb/testsuite/
* gdb.base/completion.exp (directory completion): Create the directory.
New variables uniquedir, escapeduniquedir, uniquesu, uniquesub,
escapeuniquesub.
(directory completion 2): Expect now ${escapeuniquesub}.
(Glob remaining of directory test): Remove one excessive newline.
Expect the real output.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/completion.exp | 27 |
2 files changed, 27 insertions, 9 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 1897d89..08a6219 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,14 @@ 2009-06-30 Jan Kratochvil <jan.kratochvil@redhat.com> + * gdb.base/completion.exp (directory completion): Create the directory. + New variables uniquedir, escapeduniquedir, uniquesu, uniquesub, + escapeuniquesub. + (directory completion 2): Expect now ${escapeuniquesub}. + (Glob remaining of directory test): Remove one excessive newline. + Expect the real output. + +2009-06-30 Jan Kratochvil <jan.kratochvil@redhat.com> + Fix `make check//%' target after `make check' has been ran. * Makefile.in (TEST_TARGETS): Remove the %/.dir dependency. Add a mkdir call. diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp index b937298..8af0189 100644 --- a/gdb/testsuite/gdb.base/completion.exp +++ b/gdb/testsuite/gdb.base/completion.exp @@ -735,25 +735,33 @@ gdb_test "cd ${fullsrcdir}" \ "cd to \${srcdir}" -# GDB used to fail adding / on directories, on the first try only -send_gdb "dir ../testsu\t" +# GDB used to fail adding / on directories, on the first try only. +# Do not use the `completion' start here as it would conflict with the +# testcase (complete 'file ./gdb.base/complet') expectations. +set uniquedir ${objdir}/${subdir}/compl-uNiQuEdIr +set escapeduniquedir [string_to_regexp ${uniquedir}] +set uniquesu subdi +set uniquesub ${uniquesu}r +set escapeuniquesub [string_to_regexp ${uniquesub}] +file mkdir ${uniquedir}/${uniquesub} +send_gdb "dir ${uniquedir}\t" gdb_expect { - -re "../testsuite/$" { + -re "${escapeduniquedir}/" { pass "directory completion" - send_gdb "gdb.bas\t" + send_gdb "${uniquesu}\t" } - -re "../testsuite $" { + -re "${escapeduniquedir} $" { fail "directory completion (old gdb bug)" - send_gdb "\b/gdb.bas\t" + send_gdb "\b/${uniquesu}\t" } default { fail "directory completion (timeout)" - send_gdb "\ndir ../testsuite/gdb.bas\t" + send_gdb "\ndir ${uniquedir}/${uniquesu}\t" } } gdb_expect { - -re "gdb.base/$" { + -re "${escapeuniquesub}/$" { pass "directory completion 2" } timeout { @@ -761,7 +769,8 @@ gdb_expect { } } -gdb_test "\n" "" "Glob remaining of directory test" +# Empty COMMAND sends no newline while " " sends the newline we need. +gdb_test " " "Source directories searched: .*" "Glob remaining of directory test" send_gdb "complete file ./gdb.base/compl\n" |