git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2] t0091-bugreport.sh: actually verify some content of report
@ 2023-07-05 18:31 Martin Ågren
  2023-07-05 18:40 ` [PATCH v3] " Martin Ågren
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Ågren @ 2023-07-05 18:31 UTC (permalink / raw)
  To: phillip.wood
  Cc: git, Emily Shaffer, Ævar Arnfjörð Bjarmason,
	Junio C Hamano, SZEDER Gábor

Hi Phillip,

On Mon, 3 Jul 2023 at 17:47, Phillip Wood <phillip.wood123@gmail.com> wrote:
>
> > +test_expect_success 'report contains wanted template (before first section)' '
> > +     awk "/^\[/ { exit } { print }" git-bugreport-format.txt >actual &&
>
> Personally I'd find
>
>         sed -n -e '/^\[/q;p' git-bugreport-format.txt >actual
>
> easier to understand but that's probably because I don't use awk very
> much. I'm not sure it is worth a re-roll though as I see we do use awk
> in a few of the other test scripts.

I do see we use sed quite a bit more than awk in the tests. This script
doesn't yet use awk and if most feel like you we're probably better off
introducing another sed use rather than another awk use.

I'll be happy to post a v3 with only this change. (This script uses "sed
-ne" already and I even do so elsewhere in my patch, so I'll be applying
s/-n -e/-ne/ to your suggestion.)

Thanks for reviewing!

Martin

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-07-07 12:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AN0heSrMCnygWUC5Sh1UA9v2JGtjcxYDKPFE0xUPddGEW29c3w@mail.gmail.com>
2023-07-05 18:35 ` [PATCH v3] t0091-bugreport.sh: actually verify some content of report Martin Ågren
2023-07-05 18:43   ` Martin Ågren
2023-07-05 19:53   ` Junio C Hamano
2023-07-05 19:54     ` Junio C Hamano
2023-07-07 12:26     ` Martin Ågren
2023-07-05 18:31 [PATCH v2] " Martin Ågren
2023-07-05 18:40 ` [PATCH v3] " Martin Ågren
2023-07-05 19:46   ` Phillip Wood

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).