diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2003-04-10 13:38:15 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2003-04-10 13:38:15 +0000 |
commit | ebc24dfba72c7a85d6776fe0521301c593e66793 (patch) | |
tree | fcdc6a3a55679242b49d1fc4b2b3b47af10663d4 | |
parent | b741c6dbda6b4f68b6b0fbd53bbf842c76f77c36 (diff) | |
download | gdb-ebc24dfba72c7a85d6776fe0521301c593e66793.tar.gz |
2003-04-10 Elena Zannoni <ezannoni@redhat.com>
* gdb.base/completion.exp: Use string_to_regexp to match the
working directory name.
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/completion.exp | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c0ba8641eab..766a2cf0b2d 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2003-04-10 Elena Zannoni <ezannoni@redhat.com> + + * gdb.base/completion.exp: Use string_to_regexp to match the + working directory name. + 2003-04-09 Jim Blandy <jimb@redhat.com> * gdb.c++/derivation.exp, gdb.c++/overload.exp, diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp index 512bbdbcd2e..38bbd4b73c9 100644 --- a/gdb/testsuite/gdb.base/completion.exp +++ b/gdb/testsuite/gdb.base/completion.exp @@ -669,7 +669,14 @@ cd ${srcdir} set fullsrcdir [pwd] cd ${mydir} -gdb_test "cd ${fullsrcdir}" "Working directory ${fullsrcdir}.*" "cd to \${srcdir}" +# If the directory name contains a '+' we must escape it, adding a backslash. +# If not, the test below will fail because it will interpret the '+' as a +# regexp operator. We use string_to_regexp for this purpose. + +gdb_test "cd ${fullsrcdir}" \ + "Working directory [string_to_regexp ${fullsrcdir}].*" \ + "cd to \${srcdir}" + send_gdb "file ./gdb.base/compl\t" sleep 1 gdb_expect { |