Skip to content

Commit

Permalink
Merge branch 'avar/nuke-test_i18ngrep' into build-master
Browse files Browse the repository at this point in the history
* avar/nuke-test_i18ngrep:
  tests with git#10 test_i18ngrep: replace it with 'grep'
  tests with git#9 test_i18ngrep: replace it with 'grep'
  tests with git#8 test_i18ngrep: replace it with 'grep'
  tests with #7 test_i18ngrep: replace it with 'grep'
  tests with git#6 test_i18ngrep: replace it with 'grep'
  tests with #5 test_i18ngrep: replace it with 'grep'
  tests with #4 test_i18ngrep: replace it with 'grep'
  tests with #3 test_i18ngrep: replace it with 'grep'
  tests with #2 test_i18ngrep: replace it with 'grep'
  tests with #1 test_i18ngrep: replace it with 'grep'
  • Loading branch information
avar committed Mar 7, 2023
2 parents eaa72de + 6a18f63 commit 8421703
Show file tree
Hide file tree
Showing 185 changed files with 587 additions and 587 deletions.
2 changes: 1 addition & 1 deletion t/lib-httpd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ test_http_push_nonff () {
'

test_expect_success 'non-fast-forward push shows help message' '
test_i18ngrep "Updates were rejected because" output
grep "Updates were rejected because" output
'

test_expect_${EXPECT_CAS_RESULT} 'force with lease aka cas' '
Expand Down
2 changes: 1 addition & 1 deletion t/lib-submodule-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ test_submodule_recursing_with_args_common () {
cd submodule_update &&
git branch -t invalid_sub1 origin/invalid_sub1 &&
test_must_fail $command invalid_sub1 2>err &&
test_i18ngrep sub1 err &&
grep sub1 err &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
Expand Down
16 changes: 8 additions & 8 deletions t/t0001-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
grep "Initialized empty" again/out1 &&
grep "Reinitialized existing" again/out2 &&
test_must_be_empty again/err1 &&
test_must_be_empty again/err2
'
Expand Down Expand Up @@ -332,15 +332,15 @@ 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
grep "cannot be used together" err
'

test_expect_success 'implicit bare & --separate-git-dir incompatible' '
test_when_finished "rm -rf bare.git" &&
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
grep "incompatible" err
'

test_expect_success 'bare & --separate-git-dir incompatible within worktree' '
Expand All @@ -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
grep "incompatible" err
'

test_lazy_prereq GETCWD_IGNORES_PERMS '
Expand Down Expand Up @@ -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 &&
grep "ignored --initial-branch" err &&
git -C initial-branch-option symbolic-ref HEAD >actual &&
grep hello actual
'
Expand All @@ -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
grep "<YELLOW>hint: " decoded
'

test_expect_success 'overridden default main branch name (env)' '
Expand All @@ -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
grep "invalid branch name" err
'

test_expect_success 'branch -m with the initial branch' '
Expand Down
4 changes: 2 additions & 2 deletions t/t0002-gitfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ test_expect_success 'initial setup' '
test_expect_success 'bad setup: invalid .git file format' '
echo "gitdir $REAL" >.git &&
test_must_fail git rev-parse 2>.err &&
test_i18ngrep "invalid gitfile format" .err
grep "invalid gitfile format" .err
'

test_expect_success 'bad setup: invalid .git file path' '
echo "gitdir: $REAL.not" >.git &&
test_must_fail git rev-parse 2>.err &&
test_i18ngrep "not a git repository" .err
grep "not a git repository" .err
'

test_expect_success 'final setup + check rev-parse --git-dir' '
Expand Down
4 changes: 2 additions & 2 deletions t/t0003-attributes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ test_expect_success 'root subdir attribute test' '
test_expect_success 'negative patterns' '
echo "!f test=bar" >.gitattributes &&
git check-attr test -- '"'"'!f'"'"' 2>errors &&
test_i18ngrep "Negative patterns are ignored" errors
grep "Negative patterns are ignored" errors
'

test_expect_success 'patterns starting with exclamation' '
Expand Down Expand Up @@ -415,7 +415,7 @@ test_expect_success SYMLINKS 'symlinks not respected in-tree' '
mkdir subdir &&
ln -s ../attr subdir/.gitattributes &&
attr_check_basic subdir/file unspecified &&
test_i18ngrep "unable to access.*gitattributes" err
grep "unable to access.*gitattributes" err
'

test_expect_success 'large attributes line ignored in tree' '
Expand Down
4 changes: 2 additions & 2 deletions t/t0008-ignores.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ broken_c_unquote_verbose () {

stderr_contains () {
regexp="$1"
if test_i18ngrep "$regexp" "$HOME/stderr"
if grep "$regexp" "$HOME/stderr"
then
return 0
else
Expand Down Expand Up @@ -942,7 +942,7 @@ test_expect_success SYMLINKS 'symlinks not respected in-tree' '
ln -s ignore subdir/.gitignore &&
test_must_fail git check-ignore subdir/file >actual 2>err &&
test_must_be_empty actual &&
test_i18ngrep "unable to access.*gitignore" err
grep "unable to access.*gitignore" err
'

test_done
16 changes: 8 additions & 8 deletions t/t0012-help.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,17 @@ test_expect_success "--help does not work for guides" "

test_expect_success 'git help' '
git help >help.output &&
test_i18ngrep "^ clone " help.output &&
test_i18ngrep "^ add " help.output &&
test_i18ngrep "^ log " help.output &&
test_i18ngrep "^ commit " help.output &&
test_i18ngrep "^ fetch " help.output
grep "^ clone " help.output &&
grep "^ add " help.output &&
grep "^ log " help.output &&
grep "^ commit " help.output &&
grep "^ fetch " help.output
'

test_expect_success 'git help -g' '
git help -g >help.output &&
test_i18ngrep "^ everyday " help.output &&
test_i18ngrep "^ tutorial " help.output
grep "^ everyday " help.output &&
grep "^ tutorial " help.output
'

test_expect_success 'git help fails for non-existing html pages' '
Expand Down Expand Up @@ -259,7 +259,7 @@ do
export GIT_CEILING_DIRECTORIES &&
test_expect_code 129 git -C sub $builtin -h >output 2>&1
) &&
test_i18ngrep usage output
grep usage output
'
done <builtins

Expand Down
2 changes: 1 addition & 1 deletion t/t0013-sha1dc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fi

test_expect_success 'test-sha1 detects shattered pdf' '
test_must_fail test-tool sha1 <"$TEST_DATA/shattered-1.pdf" 2>err &&
test_i18ngrep collision err &&
grep collision err &&
grep 38762cf7f55934b34d179ae6a4c80cadccbb7f0a err
'

Expand Down
8 changes: 4 additions & 4 deletions t/t0014-alias.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ test_expect_success 'nested aliases - internal execution' '
git config alias.nested-internal-1 nested-internal-2 &&
git config alias.nested-internal-2 status &&
git nested-internal-1 >output &&
test_i18ngrep "^On branch " output
grep "^On branch " output
'

test_expect_success 'nested aliases - mixed execution' '
git config alias.nested-external-1 nested-external-2 &&
git config alias.nested-external-2 "!git nested-external-3" &&
git config alias.nested-external-3 status &&
git nested-external-1 >output &&
test_i18ngrep "^On branch " output
grep "^On branch " output
'

test_expect_success 'looping aliases - internal execution' '
git config alias.loop-internal-1 loop-internal-2 &&
git config alias.loop-internal-2 loop-internal-3 &&
git config alias.loop-internal-3 loop-internal-2 &&
test_must_fail git loop-internal-1 2>output &&
test_i18ngrep "^fatal: alias loop detected: expansion of" output
grep "^fatal: alias loop detected: expansion of" output
'

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

test_expect_success 'run-command formats empty args properly' '
Expand Down
6 changes: 3 additions & 3 deletions t/t0021-conversion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ test_expect_success 'required filter with absent clean field' '
echo test >test.ac &&
test_must_fail git add test.ac 2>stderr &&
test_i18ngrep "fatal: test.ac: clean filter .absentclean. failed" stderr
grep "fatal: test.ac: clean filter .absentclean. failed" stderr
'

test_expect_success 'required filter with absent smudge field' '
Expand All @@ -276,7 +276,7 @@ test_expect_success 'required filter with absent smudge field' '
git add test.as &&
rm -f test.as &&
test_must_fail git checkout -- test.as 2>stderr &&
test_i18ngrep "fatal: test.as: smudge filter absentsmudge failed" stderr
grep "fatal: test.as: smudge filter absentsmudge failed" stderr
'

test_expect_success 'filtering large input to small output should use little memory' '
Expand Down Expand Up @@ -733,7 +733,7 @@ test_expect_success 'process filter should restart after unexpected write failur
git checkout --quiet --no-progress . 2>git-stderr.log &&
grep "smudge write error" git-stderr.log &&
test_i18ngrep "error: external filter" git-stderr.log &&
grep "error: external filter" git-stderr.log &&
cat >expected.log <<-EOF &&
START
Expand Down
4 changes: 2 additions & 2 deletions t/t0040-parse-options.sh
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,13 @@ test_expect_success 'OPT_CMDMODE() works' '
test_expect_success 'OPT_CMDMODE() detects incompatibility' '
test_must_fail test-tool parse-options --mode1 --mode2 >output 2>output.err &&
test_must_be_empty output &&
test_i18ngrep "incompatible with --mode" output.err
grep "incompatible with --mode" output.err
'

test_expect_success 'OPT_CMDMODE() detects incompatibility with something else' '
test_must_fail test-tool parse-options --set23 --mode2 >output 2>output.err &&
test_must_be_empty output &&
test_i18ngrep "incompatible with something else" output.err
grep "incompatible with something else" output.err
'

test_expect_success 'OPT_COUNTUP() with PARSE_OPT_NODASH works' '
Expand Down
6 changes: 3 additions & 3 deletions t/t0061-run-command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ test_expect_success MINGW 'subprocess inherits only std handles' '

test_expect_success 'start_command reports ENOENT (slash)' '
test-tool run-command start-command-ENOENT ./does-not-exist 2>err &&
test_i18ngrep "\./does-not-exist" err
grep "\./does-not-exist" err
'

test_expect_success 'start_command reports ENOENT (no slash)' '
test-tool run-command start-command-ENOENT does-not-exist 2>err &&
test_i18ngrep "does-not-exist" err
grep "does-not-exist" err
'

test_expect_success 'run_command can run a command' '
Expand All @@ -49,7 +49,7 @@ test_expect_success !RUNS_COMMANDS_FROM_PWD 'run_command is restricted to PATH'
echo yikes
EOF
test_must_fail test-tool run-command run-command should-not-run 2>err &&
test_i18ngrep "should-not-run" err
grep "should-not-run" err
'

test_expect_success !MINGW 'run_command can run a script without a #! line' '
Expand Down
4 changes: 2 additions & 2 deletions t/t0070-fundamental.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ test_expect_success 'incomplete sideband messages are reassembled' '
test_expect_success 'eof on sideband message is reported' '
printf 1234 >input &&
test-tool pkt-line receive-sideband <input 2>err &&
test_i18ngrep "unexpected disconnect" err
grep "unexpected disconnect" err
'

test_expect_success 'missing sideband designator is reported' '
printf 0004 >input &&
test-tool pkt-line receive-sideband <input 2>err &&
test_i18ngrep "missing sideband" err
grep "missing sideband" err
'

test_done
2 changes: 1 addition & 1 deletion t/t0091-bugreport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ test_expect_success '--output-directory puts the report in the provided dir' '

test_expect_success 'incorrect arguments abort with usage' '
test_must_fail git bugreport --false 2>output &&
test_i18ngrep usage output &&
grep usage output &&
test_path_is_missing git-bugreport-*
'

Expand Down
2 changes: 1 addition & 1 deletion t/t0300-credentials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ test_expect_success 'credential config with partial URLs' '
git -c credential.$partial.helper=yep \
-c credential.with%0anewline.username=uh-oh \
credential fill <stdin >stdout 2>stderr &&
test_i18ngrep "skipping credential lookup for key" stderr
grep "skipping credential lookup for key" stderr
'

test_done
2 changes: 1 addition & 1 deletion t/t1060-object-corruption.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ test_expect_success 'fetch into corrupted repo with index-pack' '
cd bit-error-cp &&
test_must_fail git -c transfer.unpackLimit=1 \
fetch ../no-bit-error 2>stderr &&
test_i18ngrep ! -i collision stderr
! grep -i collision stderr
)
'

Expand Down
6 changes: 3 additions & 3 deletions t/t1092-sparse-checkout-compatibility.sh
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@ test_expect_success 'status reports sparse-checkout' '
init_repos &&
git -C sparse-checkout status >full &&
git -C sparse-index status >sparse &&
test_i18ngrep "You are in a sparse checkout with " full &&
test_i18ngrep "You are in a sparse checkout." sparse
grep "You are in a sparse checkout with " full &&
grep "You are in a sparse checkout." sparse
'

test_expect_success 'add, commit, checkout' '
Expand Down Expand Up @@ -1182,7 +1182,7 @@ test_expect_success 'checkout-index outside sparse definition' '
# Without --ignore-skip-worktree-bits, outside-of-cone files will trigger
# an error
test_sparse_match test_must_fail git checkout-index -- folder1/a &&
test_i18ngrep "folder1/a has skip-worktree enabled" sparse-checkout-err &&
grep "folder1/a has skip-worktree enabled" sparse-checkout-err &&
test_path_is_missing folder1/a &&
# With --ignore-skip-worktree-bits, outside-of-cone files are checked out
Expand Down
2 changes: 1 addition & 1 deletion t/t1307-config-blob.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ test_expect_success 'parse errors in blobs are properly attributed' '
git commit -m broken &&
test_must_fail git config --blob=HEAD:config some.value 2>err &&
test_i18ngrep "HEAD:config" err
grep "HEAD:config" err
'

test_expect_success 'can parse blob ending with CR' '
Expand Down
10 changes: 5 additions & 5 deletions t/t1308-config-set.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ test_expect_success 'find string value for a key' '

test_expect_success 'check line error when NULL string is queried' '
test_expect_code 128 test-tool config get_string case.foo 2>result &&
test_i18ngrep "fatal: .*case\.foo.*\.git/config.*line 7" result
grep "fatal: .*case\.foo.*\.git/config.*line 7" result
'

test_expect_success 'find integer if value is non parse-able' '
Expand Down Expand Up @@ -333,14 +333,14 @@ test_expect_success 'check line errors for malformed values' '
br
EOF
test_expect_code 128 git br 2>result &&
test_i18ngrep "missing value for .alias\.br" result &&
test_i18ngrep "fatal: .*\.git/config" result &&
test_i18ngrep "fatal: .*line 2" result
grep "missing value for .alias\.br" result &&
grep "fatal: .*\.git/config" result &&
grep "fatal: .*line 2" result
'

test_expect_success 'error on modifying repo config without repo' '
nongit test_must_fail git config a.b c 2>err &&
test_i18ngrep "not in a git directory" err
grep "not in a git directory" err
'

cmdline_config="'foo.bar=from-cmdline'"
Expand Down
2 changes: 1 addition & 1 deletion t/t1309-early-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ test_with_config () {

test_expect_success 'ignore .git/ with incompatible repository version' '
test_with_config "[core]repositoryformatversion = 999999" 2>err &&
test_i18ngrep "warning:.* Expected git repo version <= [1-9]" err
grep "warning:.* Expected git repo version <= [1-9]" err
'

test_expect_failure 'ignore .git/ with invalid repository version' '
Expand Down
Loading

0 comments on commit 8421703

Please sign in to comment.