From: Tom Tromey <tom@tromey.com>
To: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFAv2 2/2] Add a selftest that checks documentation invariants.
Date: Tue, 06 Aug 2019 18:43:00 -0000 [thread overview]
Message-ID: <874l2u9mah.fsf@tromey.com> (raw)
In-Reply-To: <20190803133921.20154-3-philippe.waroquiers@skynet.be> (Philippe Waroquiers's message of "Sat, 3 Aug 2019 15:39:21 +0200")
>>>>> "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> writes:
Philippe> gdb/ChangeLog
Philippe> * unittests/help-doc-selftests.c: New file.
Philippe> * Makefile.in: Add the new file.
Thanks for doing this.
Philippe> +static void
Philippe> +broken_doc_invariant (const char *prefix, const char *name, const char *msg)
Philippe> +{
Philippe> + fprintf_filtered (gdb_stdout,
Philippe> + "help doc broken invariant: command '%s%s' help doc %s\n",
Philippe> + prefix, name, msg);
Normally I'd probably complain about being i18n-unfriendly here, but TBH
I don't think that matters much for unit tests.
Philippe> + /* Walk through the commands. */
Philippe> + for (c=commandlist;c;c=c->next)
This needs some spaces.
Philippe> + while (*p && *p != '\n')
Philippe> + p++;
I think this could just be "p = strchr (p, '\n')".
This is ok with those things fixed.
Tom
next prev parent reply other threads:[~2019-08-06 18:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-03 13:39 [RFAv2 0/2] Make first and last lines of 'command help documentation' consistent + add a test Philippe Waroquiers
2019-08-03 13:39 ` [RFAv2 2/2] Add a selftest that checks documentation invariants Philippe Waroquiers
2019-08-06 18:43 ` Tom Tromey [this message]
2019-08-06 22:21 ` Philippe Waroquiers
2019-08-07 2:06 ` Tom Tromey
2019-08-03 13:39 ` [RFAv2 1/2] Make first and last lines of 'command help documentation' consistent Philippe Waroquiers
2019-08-06 18:30 ` Tom Tromey
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=874l2u9mah.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=philippe.waroquiers@skynet.be \
/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