From: "Rubén Justo" <rjusto@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Achu Luma <ach.lumap@gmail.com>,
git@vger.kernel.org, christian.couder@gmail.com,
Christian Couder <chriscool@tuxfamily.org>
Subject: Re: [Outreachy][PATCH] Port helper/test-advise.c to unit-tests/t-advise.c
Date: Tue, 16 Jan 2024 12:30:36 +0100 [thread overview]
Message-ID: <8774e3a1-3362-4ba4-9eb9-012bd9665d83@gmail.com> (raw)
In-Reply-To: <6b6b455e-26b8-442e-828e-506f9a152407@gmail.com>
On 15-ene-2024 20:24:47, Rubén Justo wrote:
> - check_str(actual.buf, expect);
> + check_str_len(actual.buf, expect, strlen(expect));
> + if (!conf_val && skip_prefix(actual.buf, expect, &hint))
> + check_str_len(hint, expect_hint_msg, strlen(expect_hint_msg));
> strbuf_release(&actual);
>
> if (!check(remove(out_file) == 0))
>
> This implies a new check_str_len() helper, which I'm not including here
> but it's a trivial copy of check_str() but using strncmp().
>
> Maybe we can turn the screw a little more.
>
> I'm still not sure of the value in the changes in this series, though.
I hope, no one has wasted time with the code above. It is not testing
correctly the conditions being probed in t-advice.c.
Take it as a way to see if this is how we want to avoid multiple
instances of similar literals that might be tempting to refactor.
prev parent reply other threads:[~2024-01-16 11:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 10:21 [Outreachy][PATCH] Port helper/test-advise.c to unit-tests/t-advise.c Achu Luma
2024-01-12 22:44 ` Junio C Hamano
2024-01-15 11:37 ` Rubén Justo
2024-01-15 17:27 ` Junio C Hamano
2024-01-15 19:24 ` Rubén Justo
2024-01-16 11:30 ` Rubén Justo [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=8774e3a1-3362-4ba4-9eb9-012bd9665d83@gmail.com \
--to=rjusto@gmail.com \
--cc=ach.lumap@gmail.com \
--cc=chriscool@tuxfamily.org \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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;
as well as URLs for NNTP newsgroup(s).