Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Fernando Nasser <fnasser@redhat.com>
To: Jackie Smith Cashion <jsmith@redhat.com>
Cc: GDB Patches <gdb-patches@sources.redhat.com>
Subject: Re: RFA: "show user" output
Date: Mon, 10 Sep 2001 08:33:00 -0000	[thread overview]
Message-ID: <3B9CDC64.74D5A577@redhat.com> (raw)
In-Reply-To: <3B9BA381.DD9F24B7@redhat.com>

Jackie,

gdb_test <command to send> <regular expression of the expected output>
<test id string>

$2 is just a regular expression, just write/modify it as it was some
regexp for grep
or something and it will probably work.

Just make sure that, if you add a new test, the id string is unique
(i.e., no the
same as other tests in the same file).

Regards,
Fernando


Jackie Smith Cashion wrote:
> 
> Fernando Nasser wrote:
> >
> > I have only one question: how come there wasn't a FAILing test in
> > gdb.base/commands.exp (or there was)?  And in gdb.mi?
> 
> There is the following test in commands.exp:
> 
>     send_gdb "define mycommand\n"
>       ...
>     gdb_test "while \$arg0 > 0\nset \$arg0 -= 1\nif \(\$arg0 % 2\) ==
> 1\np/x 0xdeadbeef\nelse\np/x 0xfeedface\nend\nend\nend" \
>       ...
>     gdb_test "mycommand \$foo" \
>       ...
>     gdb_test "show user mycommand" \
>            "while.*set.*if.*p/x.*else.*p/x.*end.*" \
>            "display user command in user_defined_command_test"
> 
> Obviously, I've cut out several lines from the actual test. But if you
> look at the last call to gdb_test you see that it simply checks to see
> that the macro keywords appear in the output. The test doesn't look for
> proper "whitespace". This test also would not detect our current problem
> where the keywords are printed twice.
> 
> > Tradition says that as you've fixed it you should also add a little
> > test to prevent it to be broken again ;-)
> 
> At this time I know nearly nothing about expect scripts. I don't mind
> learning about them. To help me along does anyone want to offer a
> suggestion about testing for "whitespace" and extra keyword output in
> this test?
> 
> Jackie Smith Cashion
> 
> email:  jsmith@redhat.com
> phone:  931 438 2432

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


  reply	other threads:[~2001-09-10  8:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-06 14:58 Jackie Smith Cashion
2001-09-07  7:09 ` Fernando Nasser
2001-09-07 11:04   ` Jackie Smith Cashion
2001-09-08 11:18     ` Fernando Nasser
2001-09-08 19:13       ` Jackie Smith Cashion
2001-09-09  8:15         ` Fernando Nasser
2001-09-09 10:20           ` Jackie Smith Cashion
2001-09-10  8:33             ` Fernando Nasser [this message]
2001-09-10  7:57           ` Andrew Cagney
2001-09-10  8:35             ` Fernando Nasser
2001-09-10  8:54               ` Andrew Cagney

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=3B9CDC64.74D5A577@redhat.com \
    --to=fnasser@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jsmith@redhat.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