summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.guile
diff options
context:
space:
mode:
authorAndy Wingo <wingo@igalia.com>2015-04-28 11:15:47 +0200
committerAndy Wingo <wingo@igalia.com>2015-04-28 11:15:47 +0200
commit2631b16a570626a276f1ce6528ff1cd2cc90ce76 (patch)
tree23936805c2ad9d9710ed72d4f581d72e4e3c721a /gdb/testsuite/gdb.guile
parentfaa2211d4d3dad3f381164cdb29d27b9108760ea (diff)
downloadbinutils-gdb-2631b16a570626a276f1ce6528ff1cd2cc90ce76.tar.gz
Fix py-parameter.exp and scm-parameter.exp path matching
gdb/testsuite/ChangeLog: * gdb.python/py-parameter.exp: * gdb.guile/scm-parameter.exp: Escape the path that we are matching against, as it might contain characters that are special to regular expressions.
Diffstat (limited to 'gdb/testsuite/gdb.guile')
-rw-r--r--gdb/testsuite/gdb.guile/scm-parameter.exp3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.guile/scm-parameter.exp b/gdb/testsuite/gdb.guile/scm-parameter.exp
index 42a7011ff79..d3015f64512 100644
--- a/gdb/testsuite/gdb.guile/scm-parameter.exp
+++ b/gdb/testsuite/gdb.guile/scm-parameter.exp
@@ -30,7 +30,8 @@ gdb_install_guile_utils
gdb_install_guile_module
# We use "." here instead of ":" so that this works on win32 too.
-gdb_test "guile (print (parameter-value \"directories\"))" "$srcdir/$subdir.\\\$cdir.\\\$cwd"
+set escaped_directory [string_to_regexp "$srcdir/$subdir"]
+gdb_test "guile (print (parameter-value \"directories\"))" "$escaped_directory.\\\$cdir.\\\$cwd"
# Test a simple boolean parameter, and parameter? while we're at it.