diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-10-31 06:23:30 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-11-02 09:13:44 +0100 |
commit | 6789275d3780bcb950e6be8557aeedf160d4ad6d (patch) | |
tree | 24c1fcc6ee63c63284e507b05e3332eb6f6d5537 /t/t5504-fetch-receive-strict.sh | |
parent | test framework: further deprecate test_i18ngrep (diff) | |
download | git-6789275d3780bcb950e6be8557aeedf160d4ad6d.tar.xz git-6789275d3780bcb950e6be8557aeedf160d4ad6d.zip |
tests: teach callers of test_i18ngrep to use test_grep
They are equivalents and the former still exists, so as long as the
only change this commit makes are to rewrite test_i18ngrep to
test_grep, there won't be any new bug, even if there still are
callers of test_i18ngrep remaining in the tree, or when merged to
other topics that add new uses of test_i18ngrep.
This patch was produced more or less with
git grep -l -e 'test_i18ngrep ' 't/t[0-9][0-9][0-9][0-9]-*.sh' |
xargs perl -p -i -e 's/test_i18ngrep /test_grep /'
and a good way to sanity check the result yourself is to run the
above in a checkout of c4603c1c (test framework: further deprecate
test_i18ngrep, 2023-10-31) and compare the resulting working tree
contents with the result of applying this patch to the same commit.
You'll see that test_i18ngrep in a few t/lib-*.sh files corrected,
in addition to the manual reproduction.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5504-fetch-receive-strict.sh')
-rwxr-xr-x | t/t5504-fetch-receive-strict.sh | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/t/t5504-fetch-receive-strict.sh b/t/t5504-fetch-receive-strict.sh index 0b8ab4afdb..138e6778a4 100755 --- a/t/t5504-fetch-receive-strict.sh +++ b/t/t5504-fetch-receive-strict.sh @@ -144,7 +144,7 @@ test_expect_success 'setup bogus commit' ' test_expect_success 'fsck with no skipList input' ' test_must_fail git fsck 2>err && - test_i18ngrep "missingEmail" err + test_grep "missingEmail" err ' test_expect_success 'setup sorted and unsorted skipLists' ' @@ -169,9 +169,9 @@ test_expect_success 'fsck with unsorted skipList' ' test_expect_success 'fsck with invalid or bogus skipList input' ' git -c fsck.skipList=/dev/null -c fsck.missingEmail=ignore fsck && test_must_fail git -c fsck.skipList=does-not-exist -c fsck.missingEmail=ignore fsck 2>err && - test_i18ngrep "could not open.*: does-not-exist" err && + test_grep "could not open.*: does-not-exist" err && test_must_fail git -c fsck.skipList=.git/config -c fsck.missingEmail=ignore fsck 2>err && - test_i18ngrep "invalid object name: \[core\]" err + test_grep "invalid object name: \[core\]" err ' test_expect_success 'fsck with other accepted skipList input (comments & empty lines)' ' @@ -180,14 +180,14 @@ test_expect_success 'fsck with other accepted skipList input (comments & empty l $(test_oid 001) EOF test_must_fail git -c fsck.skipList=SKIP.with-comment fsck 2>err-with-comment && - test_i18ngrep "missingEmail" err-with-comment && + test_grep "missingEmail" err-with-comment && cat >SKIP.with-empty-line <<-EOF && $(test_oid 001) $(test_oid 002) EOF test_must_fail git -c fsck.skipList=SKIP.with-empty-line fsck 2>err-with-empty-line && - test_i18ngrep "missingEmail" err-with-empty-line + test_grep "missingEmail" err-with-empty-line ' test_expect_success 'fsck no garbage output from comments & empty lines errors' ' @@ -198,7 +198,7 @@ test_expect_success 'fsck no garbage output from comments & empty lines errors' test_expect_success 'fsck with invalid abbreviated skipList input' ' echo $commit | test_copy_bytes 20 >SKIP.abbreviated && test_must_fail git -c fsck.skipList=SKIP.abbreviated fsck 2>err-abbreviated && - test_i18ngrep "^fatal: invalid object name: " err-abbreviated + test_grep "^fatal: invalid object name: " err-abbreviated ' test_expect_success 'fsck with exhaustive accepted skipList input (various types of comments etc.)' ' @@ -231,10 +231,10 @@ test_expect_success 'push with receive.fsck.skipList' ' test_must_fail git push --porcelain dst bogus && git --git-dir=dst/.git config receive.fsck.skipList does-not-exist && test_must_fail git push --porcelain dst bogus 2>err && - test_i18ngrep "could not open.*: does-not-exist" err && + test_grep "could not open.*: does-not-exist" err && git --git-dir=dst/.git config receive.fsck.skipList config && test_must_fail git push --porcelain dst bogus 2>err && - test_i18ngrep "invalid object name: \[core\]" err && + test_grep "invalid object name: \[core\]" err && git --git-dir=dst/.git config receive.fsck.skipList SKIP && git push --porcelain dst bogus @@ -260,10 +260,10 @@ test_expect_success 'fetch with fetch.fsck.skipList' ' test_must_fail git --git-dir=dst/.git fetch "file://$(pwd)" $refspec && git --git-dir=dst/.git config fetch.fsck.skipList does-not-exist && test_must_fail git --git-dir=dst/.git fetch "file://$(pwd)" $refspec 2>err && - test_i18ngrep "could not open.*: does-not-exist" err && + test_grep "could not open.*: does-not-exist" err && git --git-dir=dst/.git config fetch.fsck.skipList dst/.git/config && test_must_fail git --git-dir=dst/.git fetch "file://$(pwd)" $refspec 2>err && - test_i18ngrep "invalid object name: \[core\]" err && + test_grep "invalid object name: \[core\]" err && git --git-dir=dst/.git config fetch.fsck.skipList dst/.git/SKIP && git --git-dir=dst/.git fetch "file://$(pwd)" $refspec @@ -271,7 +271,7 @@ test_expect_success 'fetch with fetch.fsck.skipList' ' test_expect_success 'fsck.<unknownmsg-id> dies' ' test_must_fail git -c fsck.whatEver=ignore fsck 2>err && - test_i18ngrep "Unhandled message id: whatever" err + test_grep "Unhandled message id: whatever" err ' test_expect_success 'push with receive.fsck.missingEmail=warn' ' @@ -293,7 +293,7 @@ test_expect_success 'push with receive.fsck.missingEmail=warn' ' receive.fsck.missingEmail warn && git push --porcelain dst bogus >act 2>&1 && grep "missingEmail" act && - test_i18ngrep "skipping unknown msg id.*whatever" act && + test_grep "skipping unknown msg id.*whatever" act && git --git-dir=dst/.git branch -D bogus && git --git-dir=dst/.git config --add \ receive.fsck.missingEmail ignore && @@ -321,7 +321,7 @@ test_expect_success 'fetch with fetch.fsck.missingEmail=warn' ' fetch.fsck.missingEmail warn && git --git-dir=dst/.git fetch "file://$(pwd)" $refspec >act 2>&1 && grep "missingEmail" act && - test_i18ngrep "Skipping unknown msg id.*whatever" act && + test_grep "Skipping unknown msg id.*whatever" act && rm -rf dst && git init dst && git --git-dir=dst/.git config fetch.fsckobjects true && |