Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Marek Polacek <mpolacek@redhat.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [RFC] Fixing gdb.base/completion.exp (PR testsuite/12649)
Date: Thu, 28 Apr 2011 11:56:00 -0000	[thread overview]
Message-ID: <4DB955C4.506@redhat.com> (raw)
In-Reply-To: <4DB82F26.30801@redhat.com>

Ok, here's a stab at the first part of this test.  What I tried to do
is to convert "send_gdb + sleep + gdb_expect" to gdb_test{,_multiple,no_output}.
Also some quick notes indicated by `XXX'.  Do you agree with it so far?
I've tried to preserve all the already existing tests.  Thanks.

[ ... ]
set oldtimeout1 $timeout
set timeout 30


gdb_test_no_output "complete hfgfh" "complete 'hfgfh'"

#exp_internal 0

gdb_test "complete show output" "show output-radix" "complete 'show output'"

gdb_test "complete show output-" "show output-radix" "complete 'show output-'"

gdb_test "complete p" "passcount\r\npath\r\nprint\r\nprint-object\r\nprintf\r\nptype\r\npwd\r\npython" \
"complete 'p'"

# It is not possible to use `complete' here since this would list all
# the symbols. 
gdb_test "p \t" "The history is empty." "complete 'p '"

gdb_test_no_output "complete info t foo" "complete 'info t foo'"

# XXX Should we list everything, i.e. "info target\r\ninfo tasks\r\ninfo terminal\r\n..."?
gdb_test "complete info t" "\(info \[a-z\]+\r\n\)*" "complete 'info t'"

gdb_test_no_output "complete info t " "complete 'info t '"

gdb_test_no_output "complete info asdfgh" "complete 'info asdfgh'"

gdb_test_no_output "complete info asdfgh\\x20" "complete 'info asdfgh '"

gdb_test "complete info" "info" "complete 'info'"

gdb_test "complete info " "\(info \[a-z\]+\r\n\)*" "complete 'info '"

gdb_test "info" "\"info\".*unambiguous\\." "complete (2) 'info '"

gdb_test "complete help info wat" "help info watchpoints" "complete 'help info wat'"

# XXX
# Does the `complete' behave correct?
# (gdb) p "break1<TAB> -> (gdb) p "break1.c"
# (gdb) complete p "break1 -> p "break1.c
# No `"' here? ------------------------> ^ 
# We proceed as it is.

gdb_test "complete p \"break1" "p \"break1.c" "complete 'p \"break1'"

# XXX  Here was:
# setup_xfail "*-*-*"

gdb_test "complete p \"break1." "p \"break1\\.c" "complete 'p \"break1.'"

gdb_test "p 'arg\t" "Unmatched single quote\\." "complete 'p \'arg'"

gdb_test "p 'arg\t\t" ".*argv.*" "complete (2) 'p \'arg'"


# These tests used to try completing the shorter "p b-a".
# Unfortunately, on some systems, there are .o files in system
# libraries which declare static variables named `b'.  Of course,

[ ... ]


      parent reply	other threads:[~2011-04-28 11:56 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27 14:59 Marek Polacek
2011-04-27 15:05 ` Joel Brobecker
2011-04-27 15:13   ` Tom Tromey
2011-04-27 15:23   ` Pedro Alves
2011-04-27 17:41     ` Marek Polacek
2011-04-28 14:19       ` Pedro Alves
2011-04-28 15:14         ` Pedro Alves
2011-04-29 14:10           ` Marek Polacek
2011-05-02 14:58             ` Pedro Alves
2011-05-01  9:17           ` Jan Kratochvil
2011-05-02 14:00             ` Marek Polacek
2011-05-02 14:19             ` Pedro Alves
2011-05-02 14:53               ` Jan Kratochvil
2011-05-02 15:30                 ` Pedro Alves
2011-05-02 15:44                   ` Joel Brobecker
2011-05-02 15:50                     ` Pedro Alves
2011-05-02 15:56                   ` Jan Kratochvil
2011-05-02 16:10                     ` Pedro Alves
2011-05-02 16:35                       ` Jan Kratochvil
2011-05-02 16:54                         ` Pedro Alves
2011-05-02 17:04                           ` Jan Kratochvil
2011-05-02 17:21                             ` Jan Kratochvil
2011-05-02 17:23                             ` Pedro Alves
2011-05-02 17:29                               ` Jan Kratochvil
2011-05-02 17:53                                 ` Pedro Alves
2011-05-02 17:56                                   ` Pedro Alves
2011-05-05 15:11                 ` Tom Tromey
2011-04-28 11:56 ` Marek Polacek [this message]

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=4DB955C4.506@redhat.com \
    --to=mpolacek@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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