Re: [PATCH v2] t0091-bugreport.sh: actually verify some content of report

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Phillip,

On Mon, 3 Jul 2023 at 17:47, Phillip Wood <phillip.wood123@xxxxxxxxx> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux