diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-10-31 14:23:30 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-11-02 17:13:44 +0900 |
| commit | 6789275d3780bcb950e6be8557aeedf160d4ad6d (patch) | |
| tree | 24c1fcc6ee63c63284e507b05e3332eb6f6d5537 /t/t9800-git-p4-basic.sh | |
| parent | 2e87fca189e613912b085c5140312b1f4b3f2977 (diff) | |
| download | git-6789275d3780bcb950e6be8557aeedf160d4ad6d.tar.gz | |
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/t9800-git-p4-basic.sh')
| -rwxr-xr-x | t/t9800-git-p4-basic.sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh index a4b3cb9492..53af8e34ac 100755 --- a/t/t9800-git-p4-basic.sh +++ b/t/t9800-git-p4-basic.sh @@ -54,7 +54,7 @@ test_expect_success 'git p4 sync uninitialized repo' ' ( cd "$git" && test_must_fail git p4 sync 2>errs && - test_i18ngrep "Perhaps you never did" errs + test_grep "Perhaps you never did" errs ) ' @@ -86,7 +86,7 @@ test_expect_success 'git p4 sync existing branch without changes' ' test_commit head && git p4 sync --branch=depot //depot@all && git p4 sync --branch=refs/remotes/p4/depot >out && - test_i18ngrep "No changes to import!" out + test_grep "No changes to import!" out ) ' @@ -101,7 +101,7 @@ test_expect_success 'git p4 sync existing branch with relative name' ' test_commit head && git p4 sync --branch=branch1 //depot@all && git p4 sync --branch=p4/branch1 >out && - test_i18ngrep "No changes to import!" out + test_grep "No changes to import!" out ) ' @@ -116,7 +116,7 @@ test_expect_success 'git p4 sync existing branch with nested path' ' test_commit head && git p4 sync --branch=p4/some/path //depot@all && git p4 sync --branch=some/path >out && - test_i18ngrep "No changes to import!" out + test_grep "No changes to import!" out ) ' @@ -131,7 +131,7 @@ test_expect_success 'git p4 sync branch explicit ref without p4 in path' ' test_commit head && git p4 sync --branch=refs/remotes/someremote/depot //depot@all && git p4 sync --branch=refs/remotes/someremote/depot >out && - test_i18ngrep "No changes to import!" out + test_grep "No changes to import!" out ) ' @@ -143,7 +143,7 @@ test_expect_success 'git p4 sync nonexistent ref' ' test_commit head && git p4 sync --branch=depot //depot@all && test_must_fail git p4 sync --branch=depot2 2>errs && - test_i18ngrep "Perhaps you never did" errs + test_grep "Perhaps you never did" errs ) ' @@ -155,7 +155,7 @@ test_expect_success 'git p4 sync existing non-p4-imported ref' ' test_commit head && git p4 sync --branch=depot //depot@all && test_must_fail git p4 sync --branch=refs/heads/master 2>errs && - test_i18ngrep "Perhaps you never did" errs + test_grep "Perhaps you never did" errs ) ' @@ -290,7 +290,7 @@ test_expect_success 'exit when p4 fails to produce marshaled output' ' export PATH && test_expect_code 1 git p4 clone --dest="$git" //depot >errs 2>&1 ) && - test_i18ngrep ! Traceback errs + test_grep ! Traceback errs ' # Hide a file from p4d, make sure we catch its complaint. This won't fail in @@ -301,7 +301,7 @@ test_expect_success 'exit gracefully for p4 server errors' ' mv "$db"/depot/file1,v "$db"/depot/file1,v,hidden && test_when_finished cleanup_git && test_expect_code 1 git p4 clone --dest="$git" //depot@1 >out 2>err && - test_i18ngrep "Error from p4 print" err + test_grep "Error from p4 print" err ' test_expect_success 'clone --bare should make a bare repository' ' |
