From 6789275d3780bcb950e6be8557aeedf160d4ad6d Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 31 Oct 2023 14:23:30 +0900 Subject: 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 --- t/t5324-split-commit-graph.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 't/t5324-split-commit-graph.sh') diff --git a/t/t5324-split-commit-graph.sh b/t/t5324-split-commit-graph.sh index 36c4141e67..a48c00ef50 100755 --- a/t/t5324-split-commit-graph.sh +++ b/t/t5324-split-commit-graph.sh @@ -281,7 +281,7 @@ test_expect_success 'verify hashes along chain, even in shallow' ' corrupt_file "$base_file" $(test_oid shallow) "\01" && test_must_fail git commit-graph verify --shallow 2>test_err && grep -v "^+" test_err >err && - test_i18ngrep "incorrect checksum" err + test_grep "incorrect checksum" err ) ' @@ -295,7 +295,7 @@ test_expect_success 'verify --shallow does not check base contents' ' git commit-graph verify --shallow && test_must_fail git commit-graph verify 2>test_err && grep -v "^+" test_err >err && - test_i18ngrep "incorrect checksum" err + test_grep "incorrect checksum" err ) ' @@ -308,7 +308,7 @@ test_expect_success 'warn on base graph chunk incorrect' ' corrupt_file "$base_file" $(test_oid base) "\01" && git commit-graph verify --shallow 2>test_err && grep -v "^+" test_err >err && - test_i18ngrep "commit-graph chain does not match" err + test_grep "commit-graph chain does not match" err ) ' @@ -319,11 +319,11 @@ test_expect_success 'verify after commit-graph-chain corruption' ' corrupt_file "$graphdir/commit-graph-chain" 60 "G" && git commit-graph verify 2>test_err && grep -v "^+" test_err >err && - test_i18ngrep "invalid commit-graph chain" err && + test_grep "invalid commit-graph chain" err && corrupt_file "$graphdir/commit-graph-chain" 60 "A" && git commit-graph verify 2>test_err && grep -v "^+" test_err >err && - test_i18ngrep "unable to find all commit-graph files" err + test_grep "unable to find all commit-graph files" err ) ' @@ -341,7 +341,7 @@ test_expect_success 'verify across alternates' ' corrupt_file "$tip_file" 100 "\01" && test_must_fail git commit-graph verify --shallow 2>test_err && grep -v "^+" test_err >err && - test_i18ngrep "commit-graph has incorrect fanout value" err + test_grep "commit-graph has incorrect fanout value" err ) ' @@ -353,7 +353,7 @@ test_expect_success 'add octopus merge' ' git commit-graph verify --progress 2>err && test_line_count = 1 err && grep "Verifying commits in commit graph: 100% (18/18)" err && - test_i18ngrep ! warning err && + test_grep ! warning err && test_line_count = 3 $graphdir/commit-graph-chain ' @@ -455,7 +455,7 @@ test_expect_success 'prevent regression for duplicate commits across layers' ' git init dup && git -C dup commit --allow-empty -m one && git -C dup -c core.commitGraph=false commit-graph write --split=no-merge --reachable 2>err && - test_i18ngrep "attempting to write a commit-graph" err && + test_grep "attempting to write a commit-graph" err && git -C dup commit-graph write --split=no-merge --reachable && git -C dup commit --allow-empty -m two && git -C dup commit-graph write --split=no-merge --reachable && -- cgit v1.3