aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2001-09-27 22:21:22 +0000
committerDaniel Jacobowitz <drow@false.org>2001-09-27 22:21:22 +0000
commit9b28427211134b5f480ea863b42bb2da8a52f18f (patch)
tree3ec76df77a675f28a3c275743b5bcdf520e8108a /gdb/testsuite
parentb55a47712d086798248e912a18b8a4e4419e2c83 (diff)
downloadgdb-9b28427211134b5f480ea863b42bb2da8a52f18f.zip
gdb-9b28427211134b5f480ea863b42bb2da8a52f18f.tar.gz
gdb-9b28427211134b5f480ea863b42bb2da8a52f18f.tar.bz2
* gdb.base/completion.exp: Remove incorrect 'p "a' test.
Add tests for 'p "break' (pass) and 'p "break.' (xfail).
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/completion.exp61
2 files changed, 57 insertions, 9 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 1e8f1d8..06e2302 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2001-09-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.base/completion.exp: Remove incorrect 'p "a' test.
+ Add tests for 'p "break' (pass) and 'p "break.' (xfail).
+
2001-09-27 Michael Snyder <msnyder@redhat.com>
* lib/gdb.exp (test_debug_format): New proc.
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index 975c1fc..ccd53c3 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -38,7 +38,9 @@
# "info ajksdlfk " no completions
# "info" " "
# "info " ambiguous (all info commands)
-# "p \"a" no completions (string constant)
+# "p \"break" unambiguous (completes to filename "break.c")
+# "p \"break." unambiguous (should complete to "break.c" but does not,
+# due to readline limitations)
# "p 'a" ambiguous (all symbols starting with a)
# "p b-a" ambiguous (all symbols starting with a)
# "p b-" ambiguous (all symbols)
@@ -349,20 +351,61 @@ gdb_expect {
}
-send_gdb "p \"a\t"
+send_gdb "p \"break\t"
sleep 1
gdb_expect {
- -re "^p \"a\\\x07$"\
+ -re "^p \"break\\\x07$"\
{ send_gdb "\n"
gdb_expect {
- -re "Unterminated string in expression\\..*$gdb_prompt $"\
- { pass "complete 'p a'"}
- -re ".*$gdb_prompt $" { fail "complete 'p a'"}
- timeout {fail "(timeout) complete 'p a'"}
+ -re ".*$gdb_prompt $" { fail "complete 'p \"break'"}
+ timeout {fail "(timeout) complete 'p \"break'"}
}
}
- -re ".*$gdb_prompt $" { fail "complete 'p \"a'" }
- timeout { fail "(timeout) complete 'p \"a'" }
+ -re "^p \"break\\.c\"$"\
+ { send_gdb "\n"
+ gdb_expect {
+ -re ".*$gdb_prompt $" { pass "complete 'p \"break'"}
+ timeout {fail "(timeout) complete 'p \"break'"}
+ }
+ }
+ -re "^p \"break.*$"
+ { send_gdb "\n"
+ gdb_expect {
+ -re ".*$gdb_prompt $" { fail "complete 'p \"break'"}
+ timeout {fail "(timeout) complete 'p \"break'"}
+ }
+ }
+ -re ".*$gdb_prompt $" { fail "complete 'p \"break'" }
+ timeout { fail "(timeout) complete 'p \"break'" }
+ }
+
+setup_xfail "*-*-*"
+send_gdb "p \"break.\t"
+sleep 1
+gdb_expect {
+ -re "^p \"break\\.\\\x07$"\
+ { send_gdb "\n"
+ gdb_expect {
+ -re ".*$gdb_prompt $" { fail "complete 'p \"break.'"}
+ timeout {fail "(timeout) complete 'p \"break.'"}
+ }
+ }
+ -re "^p \"break\\.c\"$"\
+ { send_gdb "\n"
+ gdb_expect {
+ -re ".*$gdb_prompt $" { pass "complete 'p \"break.'"}
+ timeout {fail "(timeout) complete 'p \"break.'"}
+ }
+ }
+ -re "^p \"break\\..*$"
+ { send_gdb "\n"
+ gdb_expect {
+ -re ".*$gdb_prompt $" { fail "complete 'p \"break.'"}
+ timeout {fail "(timeout) complete 'p \"break.'"}
+ }
+ }
+ -re ".*$gdb_prompt $" { fail "complete 'p \"break.'" }
+ timeout { fail "(timeout) complete 'p \"break.'" }
}
send_gdb "p 'a\t"