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

@ -33,13 +33,13 @@ test_systemd_analyze_verify () {
test_expect_success 'help text' '
test_expect_code 129 git maintenance -h >actual &&
test_i18ngrep "usage: git maintenance <subcommand>" actual &&
test_grep "usage: git maintenance <subcommand>" actual &&
test_expect_code 129 git maintenance barf 2>err &&
test_i18ngrep "unknown subcommand: \`barf'\''" err &&
test_i18ngrep "usage: git maintenance" err &&
test_grep "unknown subcommand: \`barf'\''" err &&
test_grep "usage: git maintenance" err &&
test_expect_code 129 git maintenance 2>err &&
test_i18ngrep "error: need a subcommand" err &&
test_i18ngrep "usage: git maintenance" err
test_grep "error: need a subcommand" err &&
test_grep "usage: git maintenance" err
'
test_expect_success 'run [--auto|--quiet]' '
@ -131,12 +131,12 @@ test_expect_success 'commit-graph auto condition' '
test_expect_success 'run --task=bogus' '
test_must_fail git maintenance run --task=bogus 2>err &&
test_i18ngrep "is not a valid task" err
test_grep "is not a valid task" err
'
test_expect_success 'run --task duplicate' '
test_must_fail git maintenance run --task=gc --task=gc 2>err &&
test_i18ngrep "cannot be selected multiple times" err
test_grep "cannot be selected multiple times" err
'
test_expect_success 'run --task=prefetch with no remotes' '
@ -377,12 +377,12 @@ test_expect_success 'pack-refs task' '
test_expect_success '--auto and --schedule incompatible' '
test_must_fail git maintenance run --auto --schedule=daily 2>err &&
test_i18ngrep "at most one" err
test_grep "at most one" err
'
test_expect_success 'invalid --schedule value' '
test_must_fail git maintenance run --schedule=annually 2>err &&
test_i18ngrep "unrecognized --schedule" err
test_grep "unrecognized --schedule" err
'
test_expect_success '--schedule inheritance weekly -> daily -> hourly' '
@ -576,15 +576,15 @@ test_expect_success !MINGW 'register and unregister with regex metacharacters' '
test_expect_success 'start --scheduler=<scheduler>' '
test_expect_code 129 git maintenance start --scheduler=foo 2>err &&
test_i18ngrep "unrecognized --scheduler argument" err &&
test_grep "unrecognized --scheduler argument" err &&
test_expect_code 129 git maintenance start --no-scheduler 2>err &&
test_i18ngrep "unknown option" err &&
test_grep "unknown option" err &&
test_expect_code 128 \
env GIT_TEST_MAINT_SCHEDULER="launchctl:true,schtasks:true" \
git maintenance start --scheduler=crontab 2>err &&
test_i18ngrep "fatal: crontab scheduler is not available" err
test_grep "fatal: crontab scheduler is not available" err
'
test_expect_success 'start from empty cron table' '