aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/mi-basics.exp
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2003-08-07 17:55:41 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2003-08-07 17:55:41 +0000
commite0f353ceed204d98f0581a17e84d33dd18c65ec5 (patch)
tree9c094245f62150a65134834582d9cc96dbdfb33c /gdb/testsuite/gdb.mi/mi-basics.exp
parent5710a1afa99d21787b0eea1a876115767684329d (diff)
downloadgdb-e0f353ceed204d98f0581a17e84d33dd18c65ec5.zip
gdb-e0f353ceed204d98f0581a17e84d33dd18c65ec5.tar.gz
gdb-e0f353ceed204d98f0581a17e84d33dd18c65ec5.tar.bz2
2003-08-07 Elena Zannoni <ezannoni@redhat.com>
* gdb.base/attach.exp, gdb.base/detach.exp, gdb.base/gcore.exp, gdb.mi/mi-basics.exp, gdb.threads/gcore-thread.exp, gdb.trace/save-trace.exp: Make sure that full pathnames are escaped correctly.
Diffstat (limited to 'gdb/testsuite/gdb.mi/mi-basics.exp')
-rw-r--r--gdb/testsuite/gdb.mi/mi-basics.exp24
1 files changed, 13 insertions, 11 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-basics.exp b/gdb/testsuite/gdb.mi/mi-basics.exp
index 98ffe1d..9377baf 100644
--- a/gdb/testsuite/gdb.mi/mi-basics.exp
+++ b/gdb/testsuite/gdb.mi/mi-basics.exp
@@ -40,6 +40,9 @@ if [mi_gdb_start] {
set testfile "basics"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
+set escapedobjdir [string_to_regexp ${objdir}]
+set escapedsrcdir [string_to_regexp ${srcdir}]
+
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
@@ -154,25 +157,25 @@ proc test_dir_specification {} {
# -environment-directory
# -environment-directory -r
-#exp_internal 1
+ set envirodir [string_to_regexp ${srcdir}/${subdir}]
+
mi_gdb_test "202-environment-directory ${srcdir}/${subdir}" \
- "\\\^done,source-path=\"${srcdir}/${subdir}.\\\$cdir.\\\$cwd\"" \
+ "\\\^done,source-path=\"${envirodir}.\\\$cdir.\\\$cwd\"" \
"environment-directory arg operation"
mi_gdb_test "203-environment-directory" \
- "\\\^done,source-path=\"${srcdir}/${subdir}.\\\$cdir.\\\$cwd\"" \
+ "\\\^done,source-path=\"${envirodir}.\\\$cdir.\\\$cwd\"" \
"environment-directory empty-string operation"
mi_gdb_test "204-environment-directory -r" \
"\\\^done,source-path=\"\\\$cdir.\\\$cwd\"" \
"environment-directory operation"
-
-#exp_internal 0
}
proc test_cwd_specification {} {
global mi_gdb_prompt
global objdir
+ global escapedobjdir
global subdir
# Change the working directory, then print the current working directory
@@ -185,7 +188,7 @@ proc test_cwd_specification {} {
"environment-cd arg operation"
mi_gdb_test "206-environment-pwd" \
- "\\\^done,cwd=\"${objdir}\"" \
+ "\\\^done,cwd=\"${escapedobjdir}\"" \
"environment-pwd operation"
}
@@ -194,6 +197,8 @@ proc test_path_specification {} {
global orig_path
global objdir
global srcdir
+ global escapedobjdir
+ global escapedsrcdir
# Add to the path, display, then reset
# Tests:
@@ -202,8 +207,6 @@ proc test_path_specification {} {
# -environment-path -r dir
# -environment-path -r
-#exp_internal 1
-
send_gdb "-environment-path\n"
gdb_expect 20 {
-re "\\\^done,path=\"\(.*\)\"\r\n$mi_gdb_prompt" {
@@ -220,18 +223,17 @@ proc test_path_specification {} {
"environment-path no-args operation"
mi_gdb_test "208-environment-path $srcdir $objdir" \
- "\\\^done,path=\"$srcdir.$objdir.$orig_path\"" \
+ "\\\^done,path=\"$escapedsrcdir.$escapedobjdir.$orig_path\"" \
"environment-path dir1 dir2 operation"
mi_gdb_test "209-environment-path -r $objdir" \
- "\\\^done,path=\"$objdir.$orig_path\"" \
+ "\\\^done,path=\"$escapedobjdir.$orig_path\"" \
"environment-path -r dir operation"
mi_gdb_test "210-environment-path -r" \
"\\\^done,path=\"$orig_path\"" \
"environment-path -r operation"
-#exp_internal 0
}
if [test_mi_interpreter_selection] {