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 | 68ab8fc55fd352e681970ff4de0df62f973e964a (patch) | |
tree | 644b910762a4ca2311fa5952ce81a5626a582c94 /gdb/testsuite/gdb.base/completion.exp | |
parent | f870b49bafa1e37c9fa7b42e7904d1fa57825c57 (diff) | |
download | fsf-binutils-gdb-68ab8fc55fd352e681970ff4de0df62f973e964a.zip fsf-binutils-gdb-68ab8fc55fd352e681970ff4de0df62f973e964a.tar.gz fsf-binutils-gdb-68ab8fc55fd352e681970ff4de0df62f973e964a.tar.bz2 |
2003-04-10 Elena Zannoni <ezannoni@redhat.com>
* gdb.base/completion.exp: Use string_to_regexp to match the
working directory name.
Diffstat (limited to 'gdb/testsuite/gdb.base/completion.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/completion.exp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp index 512bbdb..38bbd4b 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 { |