]> git.ipfire.org Git - thirdparty/git.git/commit
t: refactor tests depending on Perl to print data
authorPatrick Steinhardt <ps@pks.im>
Thu, 3 Apr 2025 05:06:03 +0000 (07:06 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Apr 2025 21:47:39 +0000 (14:47 -0700)
commit6aec8d38fddf22fa9fd3194acc2b891d295b5fbc
tree6973b0622ab90516fc1431cf3421f1687a8952fc
parentcdbdc6bf8caddc32e5fae7bfe4a63c54be21093f
t: refactor tests depending on Perl to print data

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

  - Print data in reverse. These usecases can be converted to use
    awk(1) or `sort -r`.

Refactor the tests accordingly so that we can drop a couple of
PERL_TEST_HELPERS prerequisites.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 files changed:
t/t0610-reftable-basics.sh
t/t0613-reftable-write-options.sh
t/t1010-mktree.sh
t/t4150-am.sh
t/t5300-pack-object.sh
t/t5326-multi-pack-bitmaps.sh
t/t5333-pseudo-merge-bitmaps.sh
t/t5410-receive-pack-alternates.sh
t/t5701-git-serve.sh
t/t6013-rev-list-reverse-parents.sh
t/t6115-rev-list-du.sh
t/t7006-pager.sh
t/t8002-blame.sh
t/t9850-shell.sh