diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-04-03 07:06:02 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-04-07 14:47:39 -0700 |
| commit | cdbdc6bf8caddc32e5fae7bfe4a63c54be21093f (patch) | |
| tree | 4ff7685e733a340dc1bd3e88e57c483b62f27efb /t/t7508-status.sh | |
| parent | db8ff64a3a5244b44e27e0d46a48a304a2e36456 (diff) | |
| download | git-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/t7508-status.sh')
| -rwxr-xr-x | t/t7508-status.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t7508-status.sh b/t/t7508-status.sh index 14c41b2cb7..cdc1d6fcc7 100755 --- a/t/t7508-status.sh +++ b/t/t7508-status.sh @@ -1064,9 +1064,9 @@ test_expect_success 'status -s submodule summary (clean submodule)' ' test_cmp expect output ' -test_expect_success PERL_TEST_HELPERS 'status -z implies porcelain' ' +test_expect_success 'status -z implies porcelain' ' git status --porcelain | - perl -pe "s/\012/\000/g" >expect && + tr "\012" "\000" >expect && git status -z >output && test_cmp expect output ' |
