aboutsummaryrefslogtreecommitdiffstats
path: root/t/t4029-diff-trailing-space.sh
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-04-03 07:06:02 +0200
committerJunio C Hamano <gitster@pobox.com>2025-04-07 14:47:39 -0700
commitcdbdc6bf8caddc32e5fae7bfe4a63c54be21093f (patch)
tree4ff7685e733a340dc1bd3e88e57c483b62f27efb /t/t4029-diff-trailing-space.sh
parentdb8ff64a3a5244b44e27e0d46a48a304a2e36456 (diff)
downloadgit-cdbdc6bf8caddc32e5fae7bfe4a63c54be21093f.tar.gz
t: refactor tests depending on Perl substitution operator
We have a bunch of tests that use Perl to perform substitution via the "s/" operator. These usecases can be trivially replaced with sed(1) and 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/t4029-diff-trailing-space.sh')
-rwxr-xr-xt/t4029-diff-trailing-space.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/t4029-diff-trailing-space.sh b/t/t4029-diff-trailing-space.sh
index a92a42990b..90cdde88d8 100755
--- a/t/t4029-diff-trailing-space.sh
+++ b/t/t4029-diff-trailing-space.sh
@@ -18,7 +18,7 @@ index 5f6a263..8cb8bae 100644
EOF
exit 1
-test_expect_success PERL_TEST_HELPERS "$test_description" '
+test_expect_success "$test_description" '
printf "\nx\n" > f &&
before=$(git hash-object f) &&
before=$(git rev-parse --short $before) &&
@@ -31,7 +31,8 @@ test_expect_success PERL_TEST_HELPERS "$test_description" '
git config --bool diff.suppressBlankEmpty true &&
git diff f > actual &&
test_cmp exp actual &&
- perl -i.bak -p -e "s/^\$/ /" exp &&
+ sed "s/^\$/ /" exp >exp.munged &&
+ mv exp.munged exp &&
git config --bool diff.suppressBlankEmpty false &&
git diff f > actual &&
test_cmp exp actual &&