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>
This commit is contained in:
Junio C Hamano
2023-10-31 14:23:30 +09:00
parent 2e87fca189
commit 6789275d37
225 changed files with 1191 additions and 1191 deletions

View File

@ -189,8 +189,8 @@ test_expect_success 'warn if using server-option with ls-remote with legacy prot
test_must_fail env GIT_TEST_PROTOCOL_VERSION=0 git -c protocol.version=0 \
ls-remote -o hello -o world "file://$(pwd)/file_parent" main 2>err &&
test_i18ngrep "see protocol.version in" err &&
test_i18ngrep "server options require protocol version 2 or later" err
test_grep "see protocol.version in" err &&
test_grep "server options require protocol version 2 or later" err
'
test_expect_success 'clone with file:// using protocol v2' '
@ -377,8 +377,8 @@ test_expect_success 'warn if using server-option with fetch with legacy protocol
test_must_fail env GIT_TEST_PROTOCOL_VERSION=0 git -C temp_child -c protocol.version=0 \
fetch -o hello -o world "file://$(pwd)/file_parent" main 2>err &&
test_i18ngrep "see protocol.version in" err &&
test_i18ngrep "server options require protocol version 2 or later" err
test_grep "see protocol.version in" err &&
test_grep "server options require protocol version 2 or later" err
'
test_expect_success 'server-options are sent when cloning' '
@ -399,8 +399,8 @@ test_expect_success 'warn if using server-option with clone with legacy protocol
clone --server-option=hello --server-option=world \
"file://$(pwd)/file_parent" myclone 2>err &&
test_i18ngrep "see protocol.version in" err &&
test_i18ngrep "server options require protocol version 2 or later" err
test_grep "see protocol.version in" err &&
test_grep "server options require protocol version 2 or later" err
'
test_expect_success 'upload-pack respects config using protocol v2' '
@ -495,7 +495,7 @@ test_expect_success 'partial clone warns if filter is not advertised' '
git -C server config uploadpack.allowfilter 0 &&
git -c protocol.version=2 \
clone --filter=blob:none "file://$(pwd)/server" client 2>err &&
test_i18ngrep "filtering not recognized by server, ignoring" err
test_grep "filtering not recognized by server, ignoring" err
'
test_expect_success 'even with handcrafted request, filter does not work if not advertised' '
@ -736,7 +736,7 @@ test_expect_success 'file:// --negotiate-only with protocol v0' '
--negotiate-only \
--negotiation-tip=$(git -C client rev-parse HEAD) \
origin 2>err &&
test_i18ngrep "negotiate-only requires protocol v2" err
test_grep "negotiate-only requires protocol v2" err
'
test_expect_success 'push with custom path does not request v2' '
@ -809,7 +809,7 @@ test_expect_success 'clone repository with http:// using protocol v2 with incomp
# Server responded using protocol v2
grep "git< version 2" log &&
# Client reported appropriate failure
test_i18ngrep "bytes of length header were received" err
test_grep "bytes of length header were received" err
'
test_expect_success 'clone repository with http:// using protocol v2 with incomplete pktline body' '
@ -826,7 +826,7 @@ test_expect_success 'clone repository with http:// using protocol v2 with incomp
# Server responded using protocol v2
grep "git< version 2" log &&
# Client reported appropriate failure
test_i18ngrep "bytes of body are still expected" err
test_grep "bytes of body are still expected" err
'
test_expect_success 'clone with http:// using protocol v2 and invalid parameters' '
@ -973,7 +973,7 @@ test_expect_success 'when server sends "ready", expect DELIM' '
test_must_fail git -C http_child -c protocol.version=2 \
fetch "$HTTPD_URL/one_time_perl/http_parent" 2> err &&
test_i18ngrep "expected packfile to be sent after .ready." err
test_grep "expected packfile to be sent after .ready." err
'
test_expect_success 'when server does not send "ready", expect FLUSH' '
@ -1001,7 +1001,7 @@ test_expect_success 'when server does not send "ready", expect FLUSH' '
fetch "$HTTPD_URL/one_time_perl/http_parent" 2> err &&
grep "fetch< .*acknowledgments" log &&
! grep "fetch< .*ready" log &&
test_i18ngrep "expected no other sections to be sent after no .ready." err
test_grep "expected no other sections to be sent after no .ready." err
'
configure_exclusion () {
@ -1111,7 +1111,7 @@ test_expect_success 'fetching with valid packfile URI but invalid hash fails' '
git -c protocol.version=2 \
-c fetch.uriprotocols=http,https \
clone "$HTTPD_URL/smart/http_parent" http_child 2>err &&
test_i18ngrep "pack downloaded from.*does not match expected hash" err
test_grep "pack downloaded from.*does not match expected hash" err
'
test_expect_success 'packfile-uri with transfer.fsckobjects' '
@ -1165,7 +1165,7 @@ test_expect_success 'packfile-uri with transfer.fsckobjects fails on bad object'
test_must_fail git -c protocol.version=2 -c transfer.fsckobjects=1 \
-c fetch.uriprotocols=http,https \
clone "$HTTPD_URL/smart/http_parent" http_child 2>error &&
test_i18ngrep "invalid author/committer line - missing email" error
test_grep "invalid author/committer line - missing email" error
'
test_expect_success 'packfile-uri with transfer.fsckobjects succeeds when .gitmodules is separate from tree' '
@ -1213,7 +1213,7 @@ test_expect_success 'packfile-uri with transfer.fsckobjects fails when .gitmodul
test_must_fail git -c protocol.version=2 -c transfer.fsckobjects=1 \
-c fetch.uriprotocols=http,https \
clone "$HTTPD_URL/smart/http_parent" http_child 2>err &&
test_i18ngrep "disallowed submodule name" err
test_grep "disallowed submodule name" err
'
test_expect_success 'packfile-uri path redacted in trace' '
@ -1296,7 +1296,7 @@ test_expect_success 'http:// --negotiate-only without wait-for-done support' '
--negotiate-only \
--negotiation-tip=$(git -C client rev-parse HEAD) \
origin 2>err &&
test_i18ngrep "server does not support wait-for-done" err
test_grep "server does not support wait-for-done" err
'
test_expect_success 'http:// --negotiate-only with protocol v0' '
@ -1310,7 +1310,7 @@ test_expect_success 'http:// --negotiate-only with protocol v0' '
--negotiate-only \
--negotiation-tip=$(git -C client rev-parse HEAD) \
origin 2>err &&
test_i18ngrep "negotiate-only requires protocol v2" err
test_grep "negotiate-only requires protocol v2" err
'
# DO NOT add non-httpd-specific tests here, because the last part of this