Re: [PATCH v3 12/20] t: refactor tests depending on Perl to print data
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Apr 2, 2025, 07:16 UTC
- Message-ID
- <Z-zkOFD8PRS4L7Ed@pks.im>
- In-Reply-To
- <4d461a62-9cf5-c64d-cd97-c70ef53afbac@gmx.de>
On Tue, Apr 01, 2025 at 08:35:25PM +0200, Johannes Schindelin wrote:
Show 15 quoted lines
> Hi Patrick, > > On Thu, 27 Mar 2025, Patrick Steinhardt wrote: > > > A bunch of tests rely on Perl to print data in various different ways. > > These usages fall into the following categories: > > > > - Print data conditionally by matching patterns. These usecases can be > > converted to use awk(1) rather easily. > > > > - Print data repeatedly. These usecases can typically be converted to > > use a combination of `test-tool genzeros` and sed(1). > > It might be even more elegant to teach `genzeros` to generate streams of > bytes other than NUL.
Agreed, that would feel more elegant indeed (well, despite the name being inaccurate now). I decided against doing this so that we don't have to introduce too many tools, but wouldn't mind doing so if you or other people feel strongly about it.
> > - Print data in reverse. These usecases can be converted to use > > awk(1). > > Or, in one case, `sort -r`.
True, fixed.
Patrick