diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-04-03 07:06:01 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-04-07 14:47:38 -0700 |
| commit | db8ff64a3a5244b44e27e0d46a48a304a2e36456 (patch) | |
| tree | 25af3e5f4f6d9b274297827c6c5b8007ddb7748e /t/t4020-diff-external.sh | |
| parent | Makefile: stop requiring Perl when running tests (diff) | |
| download | git-db8ff64a3a5244b44e27e0d46a48a304a2e36456.tar.gz git-db8ff64a3a5244b44e27e0d46a48a304a2e36456.zip | |
t: refactor tests depending on Perl transliteration operator
We have a bunch of tests that use Perl to perform character
transliteration via the "y/" or "tr/" operator. These usecases can be
trivially replaced with tr(1).
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>
Diffstat (limited to 't/t4020-diff-external.sh')
| -rwxr-xr-x | t/t4020-diff-external.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t4020-diff-external.sh b/t/t4020-diff-external.sh index 189294de7e..c8a23d5148 100755 --- a/t/t4020-diff-external.sh +++ b/t/t4020-diff-external.sh @@ -237,9 +237,9 @@ check_external_diff 0 empty empty 0 on --quiet check_external_diff 1 empty empty 1 on --quiet check_external_diff 128 empty error 2 on --quiet -echo NULZbetweenZwords | perl -pe 'y/Z/\000/' > file +echo NULZbetweenZwords | tr "Z" "\000" > file -test_expect_success PERL_TEST_HELPERS 'force diff with "diff"' ' +test_expect_success 'force diff with "diff"' ' after=$(git hash-object file) && after=$(git rev-parse --short $after) && echo >.gitattributes "file diff" && @@ -300,7 +300,7 @@ test_expect_success 'external diff with autocrlf = true' ' test $(wc -l <crlfed.txt) = $(keep_only_cr <crlfed.txt | wc -c) ' -test_expect_success PERL_TEST_HELPERS 'diff --cached' ' +test_expect_success 'diff --cached' ' test_config core.autocrlf true && git add file && git update-index --assume-unchanged file && |
