diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-10-31 06:23:30 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-11-02 09:13:44 +0100 |
commit | 6789275d3780bcb950e6be8557aeedf160d4ad6d (patch) | |
tree | 24c1fcc6ee63c63284e507b05e3332eb6f6d5537 /t/t4001-diff-rename.sh | |
parent | test framework: further deprecate test_i18ngrep (diff) | |
download | git-6789275d3780bcb950e6be8557aeedf160d4ad6d.tar.xz git-6789275d3780bcb950e6be8557aeedf160d4ad6d.zip |
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/t4001-diff-rename.sh')
-rwxr-xr-x | t/t4001-diff-rename.sh | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/t/t4001-diff-rename.sh b/t/t4001-diff-rename.sh index 3dc9047044..85be1367de 100755 --- a/t/t4001-diff-rename.sh +++ b/t/t4001-diff-rename.sh @@ -135,25 +135,25 @@ test_expect_success 'favour same basenames over different ones' ' mkdir subdir && git mv another-path subdir/path1 && git status >out && - test_i18ngrep "renamed: .*path1 -> subdir/path1" out + test_grep "renamed: .*path1 -> subdir/path1" out ' test_expect_success 'test diff.renames=true for git status' ' git -c diff.renames=true status >out && - test_i18ngrep "renamed: .*path1 -> subdir/path1" out + test_grep "renamed: .*path1 -> subdir/path1" out ' test_expect_success 'test diff.renames=false for git status' ' git -c diff.renames=false status >out && - test_i18ngrep ! "renamed: .*path1 -> subdir/path1" out && - test_i18ngrep "new file: .*subdir/path1" out && - test_i18ngrep "deleted: .*[^/]path1" out + test_grep ! "renamed: .*path1 -> subdir/path1" out && + test_grep "new file: .*subdir/path1" out && + test_grep "deleted: .*[^/]path1" out ' test_expect_success 'favour same basenames even with minor differences' ' git show HEAD:path1 | sed "s/15/16/" > subdir/path1 && git status >out && - test_i18ngrep "renamed: .*path1 -> subdir/path1" out + test_grep "renamed: .*path1 -> subdir/path1" out ' test_expect_success 'two files with same basename and same content' ' @@ -165,7 +165,7 @@ test_expect_success 'two files with same basename and same content' ' git commit -m 2 && git mv dir other-dir && git status >out && - test_i18ngrep "renamed: .*dir/A/file -> other-dir/A/file" out + test_grep "renamed: .*dir/A/file -> other-dir/A/file" out ' test_expect_success 'setup for many rename source candidates' ' @@ -202,9 +202,9 @@ test_expect_success 'rename pretty print with nothing in common' ' git mv a/b/c c/b/a && git commit -m "a/b/c -> c/b/a" && git diff -M --summary HEAD^ HEAD >output && - test_i18ngrep " a/b/c => c/b/a " output && + test_grep " a/b/c => c/b/a " output && git diff -M --stat HEAD^ HEAD >output && - test_i18ngrep " a/b/c => c/b/a " output + test_grep " a/b/c => c/b/a " output ' test_expect_success 'rename pretty print with common prefix' ' @@ -212,9 +212,9 @@ test_expect_success 'rename pretty print with common prefix' ' git mv c/b/a c/d/e && git commit -m "c/b/a -> c/d/e" && git diff -M --summary HEAD^ HEAD >output && - test_i18ngrep " c/{b/a => d/e} " output && + test_grep " c/{b/a => d/e} " output && git diff -M --stat HEAD^ HEAD >output && - test_i18ngrep " c/{b/a => d/e} " output + test_grep " c/{b/a => d/e} " output ' test_expect_success 'rename pretty print with common suffix' ' @@ -222,9 +222,9 @@ test_expect_success 'rename pretty print with common suffix' ' git mv c/d/e d/e && git commit -m "c/d/e -> d/e" && git diff -M --summary HEAD^ HEAD >output && - test_i18ngrep " {c/d => d}/e " output && + test_grep " {c/d => d}/e " output && git diff -M --stat HEAD^ HEAD >output && - test_i18ngrep " {c/d => d}/e " output + test_grep " {c/d => d}/e " output ' test_expect_success 'rename pretty print with common prefix and suffix' ' @@ -232,9 +232,9 @@ test_expect_success 'rename pretty print with common prefix and suffix' ' git mv d/e d/f/e && git commit -m "d/e -> d/f/e" && git diff -M --summary HEAD^ HEAD >output && - test_i18ngrep " d/{ => f}/e " output && + test_grep " d/{ => f}/e " output && git diff -M --stat HEAD^ HEAD >output && - test_i18ngrep " d/{ => f}/e " output + test_grep " d/{ => f}/e " output ' test_expect_success 'rename pretty print common prefix and suffix overlap' ' @@ -242,9 +242,9 @@ test_expect_success 'rename pretty print common prefix and suffix overlap' ' git mv d/f/e d/f/f/e && git commit -m "d/f/e d/f/f/e" && git diff -M --summary HEAD^ HEAD >output && - test_i18ngrep " d/f/{ => f}/e " output && + test_grep " d/f/{ => f}/e " output && git diff -M --stat HEAD^ HEAD >output && - test_i18ngrep " d/f/{ => f}/e " output + test_grep " d/f/{ => f}/e " output ' test_expect_success 'diff-tree -l0 defaults to a big rename limit, not zero' ' |