Skip to content

Commit a8e2394

Browse files
committed
Merge branch 'jc/test-i18ngrep'
Another step to deprecate test_i18ngrep. * jc/test-i18ngrep: tests: teach callers of test_i18ngrep to use test_grep test framework: further deprecate test_i18ngrep
2 parents ca320b2 + 6789275 commit a8e2394

File tree

226 files changed

+1212
-1210
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+1212
-1210
lines changed

contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ test_expect_success 'git push properly warns about insufficient permissions' '
161161
git add foo.forbidden &&
162162
git commit -m "add a file" &&
163163
git push 2>actual &&
164-
test_i18ngrep "foo.forbidden is not a permitted file" actual
164+
test_grep "foo.forbidden is not a permitted file" actual
165165
)
166166
'
167167

t/lib-httpd.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ test_http_push_nonff () {
255255
'
256256

257257
test_expect_success 'non-fast-forward push shows help message' '
258-
test_i18ngrep "Updates were rejected because" output
258+
test_grep "Updates were rejected because" output
259259
'
260260

261261
test_expect_${EXPECT_CAS_RESULT} 'force with lease aka cas' '

t/lib-submodule-update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ test_submodule_recursing_with_args_common () {
830830
cd submodule_update &&
831831
git branch -t invalid_sub1 origin/invalid_sub1 &&
832832
test_must_fail $command invalid_sub1 2>err &&
833-
test_i18ngrep sub1 err &&
833+
test_grep sub1 err &&
834834
test_superproject_content origin/add_sub1 &&
835835
test_submodule_content sub1 origin/add_sub1
836836
)

t/t0001-init.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ test_expect_success 'reinit' '
168168
git -c init.defaultBranch=initial init >out1 2>err1 &&
169169
git init >out2 2>err2
170170
) &&
171-
test_i18ngrep "Initialized empty" again/out1 &&
172-
test_i18ngrep "Reinitialized existing" again/out2 &&
171+
test_grep "Initialized empty" again/out1 &&
172+
test_grep "Reinitialized existing" again/out2 &&
173173
test_must_be_empty again/err1 &&
174174
test_must_be_empty again/err2
175175
'
@@ -332,15 +332,15 @@ test_expect_success 'init with separate gitdir' '
332332

333333
test_expect_success 'explicit bare & --separate-git-dir incompatible' '
334334
test_must_fail git init --bare --separate-git-dir goop.git bare.git 2>err &&
335-
test_i18ngrep "cannot be used together" err
335+
test_grep "cannot be used together" err
336336
'
337337

338338
test_expect_success 'implicit bare & --separate-git-dir incompatible' '
339339
test_when_finished "rm -rf bare.git" &&
340340
mkdir -p bare.git &&
341341
test_must_fail env GIT_DIR=. \
342342
git -C bare.git init --separate-git-dir goop.git 2>err &&
343-
test_i18ngrep "incompatible" err
343+
test_grep "incompatible" err
344344
'
345345

346346
test_expect_success 'bare & --separate-git-dir incompatible within worktree' '
@@ -349,7 +349,7 @@ test_expect_success 'bare & --separate-git-dir incompatible within worktree' '
349349
git clone --bare . bare.git &&
350350
git -C bare.git worktree add --detach ../linkwt &&
351351
test_must_fail git -C linkwt init --separate-git-dir seprepo 2>err &&
352-
test_i18ngrep "incompatible" err
352+
test_grep "incompatible" err
353353
'
354354

355355
test_lazy_prereq GETCWD_IGNORES_PERMS '
@@ -563,7 +563,7 @@ test_expect_success '--initial-branch' '
563563
564564
: re-initializing should not change the branch name &&
565565
git init --initial-branch=ignore initial-branch-option 2>err &&
566-
test_i18ngrep "ignored --initial-branch" err &&
566+
test_grep "ignored --initial-branch" err &&
567567
git -C initial-branch-option symbolic-ref HEAD >actual &&
568568
grep hello actual
569569
'
@@ -579,7 +579,7 @@ test_expect_success 'advice on unconfigured init.defaultBranch' '
579579
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \
580580
init unconfigured-default-branch-name 2>err &&
581581
test_decode_color <err >decoded &&
582-
test_i18ngrep "<YELLOW>hint: " decoded
582+
test_grep "<YELLOW>hint: " decoded
583583
'
584584

585585
test_expect_success 'overridden default main branch name (env)' '
@@ -592,7 +592,7 @@ test_expect_success 'overridden default main branch name (env)' '
592592
test_expect_success 'invalid default branch name' '
593593
test_must_fail env GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME="with space" \
594594
git init initial-branch-invalid 2>err &&
595-
test_i18ngrep "invalid branch name" err
595+
test_grep "invalid branch name" err
596596
'
597597

598598
test_expect_success 'branch -m with the initial branch' '

t/t0002-gitfile.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ test_expect_success 'initial setup' '
2222
test_expect_success 'bad setup: invalid .git file format' '
2323
echo "gitdir $REAL" >.git &&
2424
test_must_fail git rev-parse 2>.err &&
25-
test_i18ngrep "invalid gitfile format" .err
25+
test_grep "invalid gitfile format" .err
2626
'
2727

2828
test_expect_success 'bad setup: invalid .git file path' '
2929
echo "gitdir: $REAL.not" >.git &&
3030
test_must_fail git rev-parse 2>.err &&
31-
test_i18ngrep "not a git repository" .err
31+
test_grep "not a git repository" .err
3232
'
3333

3434
test_expect_success 'final setup + check rev-parse --git-dir' '

t/t0003-attributes.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ test_expect_success 'root subdir attribute test' '
263263
test_expect_success 'negative patterns' '
264264
echo "!f test=bar" >.gitattributes &&
265265
git check-attr test -- '"'"'!f'"'"' 2>errors &&
266-
test_i18ngrep "Negative patterns are ignored" errors
266+
test_grep "Negative patterns are ignored" errors
267267
'
268268

269269
test_expect_success 'patterns starting with exclamation' '
@@ -496,7 +496,7 @@ test_expect_success SYMLINKS 'symlinks not respected in-tree' '
496496
mkdir subdir &&
497497
ln -s ../attr subdir/.gitattributes &&
498498
attr_check_basic subdir/file unspecified &&
499-
test_i18ngrep "unable to access.*gitattributes" err
499+
test_grep "unable to access.*gitattributes" err
500500
'
501501

502502
test_expect_success 'large attributes line ignored in tree' '

t/t0008-ignores.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ broken_c_unquote_verbose () {
4949

5050
stderr_contains () {
5151
regexp="$1"
52-
if test_i18ngrep "$regexp" "$HOME/stderr"
52+
if test_grep "$regexp" "$HOME/stderr"
5353
then
5454
return 0
5555
else
@@ -942,7 +942,7 @@ test_expect_success SYMLINKS 'symlinks not respected in-tree' '
942942
ln -s ignore subdir/.gitignore &&
943943
test_must_fail git check-ignore subdir/file >actual 2>err &&
944944
test_must_be_empty actual &&
945-
test_i18ngrep "unable to access.*gitignore" err
945+
test_grep "unable to access.*gitignore" err
946946
'
947947

948948
test_done

t/t0012-help.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,17 @@ test_expect_success "--help does not work for guides" "
100100

101101
test_expect_success 'git help' '
102102
git help >help.output &&
103-
test_i18ngrep "^ clone " help.output &&
104-
test_i18ngrep "^ add " help.output &&
105-
test_i18ngrep "^ log " help.output &&
106-
test_i18ngrep "^ commit " help.output &&
107-
test_i18ngrep "^ fetch " help.output
103+
test_grep "^ clone " help.output &&
104+
test_grep "^ add " help.output &&
105+
test_grep "^ log " help.output &&
106+
test_grep "^ commit " help.output &&
107+
test_grep "^ fetch " help.output
108108
'
109109

110110
test_expect_success 'git help -g' '
111111
git help -g >help.output &&
112-
test_i18ngrep "^ everyday " help.output &&
113-
test_i18ngrep "^ tutorial " help.output
112+
test_grep "^ everyday " help.output &&
113+
test_grep "^ tutorial " help.output
114114
'
115115

116116
test_expect_success 'git help fails for non-existing html pages' '
@@ -257,7 +257,7 @@ do
257257
export GIT_CEILING_DIRECTORIES &&
258258
test_expect_code 129 git -C sub $builtin -h >output 2>&1
259259
) &&
260-
test_i18ngrep usage output
260+
test_grep usage output
261261
'
262262
done <builtins
263263

t/t0013-sha1dc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fi
1616

1717
test_expect_success 'test-sha1 detects shattered pdf' '
1818
test_must_fail test-tool sha1 <"$TEST_DATA/shattered-1.pdf" 2>err &&
19-
test_i18ngrep collision err &&
19+
test_grep collision err &&
2020
grep 38762cf7f55934b34d179ae6a4c80cadccbb7f0a err
2121
'
2222

t/t0014-alias.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ test_expect_success 'nested aliases - internal execution' '
88
git config alias.nested-internal-1 nested-internal-2 &&
99
git config alias.nested-internal-2 status &&
1010
git nested-internal-1 >output &&
11-
test_i18ngrep "^On branch " output
11+
test_grep "^On branch " output
1212
'
1313

1414
test_expect_success 'nested aliases - mixed execution' '
1515
git config alias.nested-external-1 nested-external-2 &&
1616
git config alias.nested-external-2 "!git nested-external-3" &&
1717
git config alias.nested-external-3 status &&
1818
git nested-external-1 >output &&
19-
test_i18ngrep "^On branch " output
19+
test_grep "^On branch " output
2020
'
2121

2222
test_expect_success 'looping aliases - internal execution' '
2323
git config alias.loop-internal-1 loop-internal-2 &&
2424
git config alias.loop-internal-2 loop-internal-3 &&
2525
git config alias.loop-internal-3 loop-internal-2 &&
2626
test_must_fail git loop-internal-1 2>output &&
27-
test_i18ngrep "^fatal: alias loop detected: expansion of" output
27+
test_grep "^fatal: alias loop detected: expansion of" output
2828
'
2929

3030
# This test is disabled until external loops are fixed, because would block
@@ -34,7 +34,7 @@ test_expect_success 'looping aliases - internal execution' '
3434
# git config alias.loop-mixed-1 loop-mixed-2 &&
3535
# git config alias.loop-mixed-2 "!git loop-mixed-1" &&
3636
# test_must_fail git loop-mixed-1 2>output &&
37-
# test_i18ngrep "^fatal: alias loop detected: expansion of" output
37+
# test_grep "^fatal: alias loop detected: expansion of" output
3838
#'
3939

4040
test_expect_success 'run-command formats empty args properly' '

0 commit comments

Comments
 (0)