From: Daniel Jacobowitz <drow@mvista.com>
To: Fernando Nasser <fnasser@redhat.com>
Cc: Eli Zaretskii <eliz@is.elta.co.il>,
gdb@sources.redhat.com, Corinna Vinschen <vinschen@cygnus.com>
Subject: Re: [rfc] Completion tests failing
Date: Thu, 27 Sep 2001 10:22:00 -0000 [thread overview]
Message-ID: <20010927132302.B23757@nevyn.them.org> (raw)
In-Reply-To: <3BB345F9.9CC3B68@redhat.com>
On Thu, Sep 27, 2001 at 11:30:01AM -0400, Fernando Nasser wrote:
> I am not 100% sure of what was Eli's intention, but I guess we would
> need to add a test to add the closing quote if the filename started
> with quote. (The space at the end seems normal as the completer has
> found a "complete" completion (i.e., a full file name) already).
>
> Eli is in another time zone, so we may have to wait until tomorrow
> to hear from him.
>
> Thanks for finding/fixing this.
OK, it seems that we do not add the closing quote if there was a .,
because of our readline interactions; thanks for explaining that, Eli.
I've added a test for it anyway, marked XFAIL.
OK to commit the attached?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
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).
Index: completion.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/completion.exp,v
retrieving revision 1.6
diff -u -r1.6 completion.exp
--- completion.exp 2001/08/06 22:08:12 1.6
+++ completion.exp 2001/09/27 17:19:36
@@ -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 @@
}
-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"
next prev parent reply other threads:[~2001-09-27 10:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-26 18:13 Daniel Jacobowitz
2001-09-26 18:26 ` Elena Zannoni
2001-09-26 18:42 ` Daniel Jacobowitz
2001-09-27 1:39 ` Eli Zaretskii
2001-09-27 5:05 ` Fernando Nasser
2001-09-27 7:29 ` Daniel Jacobowitz
2001-09-27 7:33 ` Daniel Jacobowitz
2001-09-27 8:34 ` Fernando Nasser
2001-09-27 10:01 ` Eli Zaretskii
2001-09-27 10:22 ` Daniel Jacobowitz [this message]
2001-09-27 12:08 ` Eli Zaretskii
2001-09-27 13:48 ` Fernando Nasser
2001-09-27 15:22 ` Daniel Jacobowitz
2001-09-27 8:36 ` Eli Zaretskii
2001-09-27 10:00 ` Daniel Jacobowitz
2001-09-27 12:07 ` Eli Zaretskii
2001-09-27 12:19 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010927132302.B23757@nevyn.them.org \
--to=drow@mvista.com \
--cc=eliz@is.elta.co.il \
--cc=fnasser@redhat.com \
--cc=gdb@sources.redhat.com \
--cc=vinschen@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox