summaryrefslogtreecommitdiff
path: root/t/t0001-init.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-10-31 05:23:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2023-11-02 08:13:44 (GMT)
commit6789275d3780bcb950e6be8557aeedf160d4ad6d (patch)
tree24c1fcc6ee63c63284e507b05e3332eb6f6d5537 /t/t0001-init.sh
parent2e87fca189e613912b085c5140312b1f4b3f2977 (diff)
downloadgit-6789275d3780bcb950e6be8557aeedf160d4ad6d.zip
git-6789275d3780bcb950e6be8557aeedf160d4ad6d.tar.gz
git-6789275d3780bcb950e6be8557aeedf160d4ad6d.tar.bz2
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/t0001-init.sh')
-rwxr-xr-xt/t0001-init.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index 30a6edc..2b78e3b 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -168,8 +168,8 @@ test_expect_success 'reinit' '
git -c init.defaultBranch=initial init >out1 2>err1 &&
git init >out2 2>err2
) &&
- test_i18ngrep "Initialized empty" again/out1 &&
- test_i18ngrep "Reinitialized existing" again/out2 &&
+ test_grep "Initialized empty" again/out1 &&
+ test_grep "Reinitialized existing" again/out2 &&
test_must_be_empty again/err1 &&
test_must_be_empty again/err2
'
@@ -332,7 +332,7 @@ test_expect_success 'init with separate gitdir' '
test_expect_success 'explicit bare & --separate-git-dir incompatible' '
test_must_fail git init --bare --separate-git-dir goop.git bare.git 2>err &&
- test_i18ngrep "cannot be used together" err
+ test_grep "cannot be used together" err
'
test_expect_success 'implicit bare & --separate-git-dir incompatible' '
@@ -340,7 +340,7 @@ test_expect_success 'implicit bare & --separate-git-dir incompatible' '
mkdir -p bare.git &&
test_must_fail env GIT_DIR=. \
git -C bare.git init --separate-git-dir goop.git 2>err &&
- test_i18ngrep "incompatible" err
+ test_grep "incompatible" err
'
test_expect_success 'bare & --separate-git-dir incompatible within worktree' '
@@ -349,7 +349,7 @@ test_expect_success 'bare & --separate-git-dir incompatible within worktree' '
git clone --bare . bare.git &&
git -C bare.git worktree add --detach ../linkwt &&
test_must_fail git -C linkwt init --separate-git-dir seprepo 2>err &&
- test_i18ngrep "incompatible" err
+ test_grep "incompatible" err
'
test_lazy_prereq GETCWD_IGNORES_PERMS '
@@ -563,7 +563,7 @@ test_expect_success '--initial-branch' '
: re-initializing should not change the branch name &&
git init --initial-branch=ignore initial-branch-option 2>err &&
- test_i18ngrep "ignored --initial-branch" err &&
+ test_grep "ignored --initial-branch" err &&
git -C initial-branch-option symbolic-ref HEAD >actual &&
grep hello actual
'
@@ -579,7 +579,7 @@ test_expect_success 'advice on unconfigured init.defaultBranch' '
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \
init unconfigured-default-branch-name 2>err &&
test_decode_color <err >decoded &&
- test_i18ngrep "<YELLOW>hint: " decoded
+ test_grep "<YELLOW>hint: " decoded
'
test_expect_success 'overridden default main branch name (env)' '
@@ -592,7 +592,7 @@ test_expect_success 'overridden default main branch name (env)' '
test_expect_success 'invalid default branch name' '
test_must_fail env GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME="with space" \
git init initial-branch-invalid 2>err &&
- test_i18ngrep "invalid branch name" err
+ test_grep "invalid branch name" err
'
test_expect_success 'branch -m with the initial branch' '