Subject: [PATCH 3/6] tests: remove misc use of test_i18n{cmp,grep}

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Mon, 11 Jan 2021 15:47:37 +0100

Remove miscellaneous use of test_i18n{cmp,grep} from contrib/*,
lib-*.sh and t/*/*.sh etc. noted in an earlier commit we're removing
the GIT_TEST_GETTEXT_POISON=true facility.

This leaves the only users of these functions in t/t[0-9]*.sh tests,
which makes it easier to do a follow-up for-loop search-replacement of
those occurrences at a later date.

Signed-off-by: Ævar Arnfjörð Bjarmason <[email-masked]>
---
 contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh | 2 +-
 t/lib-credential.sh                                  | 2 +-
 t/lib-httpd.sh                                       | 2 +-
 t/lib-log-graph.sh                                   | 4 ++--
 t/lib-submodule-update.sh                            | 2 +-
 t/t5411/test-0026-push-options.sh                    | 3 +--
 t/t5411/test-0027-push-options--porcelain.sh         | 3 +--
 7 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh b/contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh
index 6187ec67fa..3278334b9b 100755
--- a/contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh
+++ b/contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh
@@ -161,7 +161,7 @@ test_expect_success 'git push properly warns about insufficient permissions' '
 		git add foo.forbidden &&
 		git commit -m "add a file" &&
 		git push 2>actual &&
-		test_i18ngrep "foo.forbidden is not a permitted file" actual
+		grep "foo.forbidden is not a permitted file" actual
 	)
 '
 
diff --git a/t/lib-credential.sh b/t/lib-credential.sh
index dea2cbef51..5ea8bc9f1d 100644
--- a/t/lib-credential.sh
+++ b/t/lib-credential.sh
@@ -20,7 +20,7 @@ check() {
 		false
 	fi &&
 	test_cmp expect-stdout stdout &&
-	test_i18ncmp expect-stderr stderr
+	test_cmp expect-stderr stderr
 }
 
 read_chunk() {
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index d2edfa4c50..a3ae0616e6 100644
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
@@ -219,7 +219,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' '
diff --git a/t/lib-log-graph.sh b/t/lib-log-graph.sh
index 1184cceef2..bf952ef920 100644
--- a/t/lib-log-graph.sh
+++ b/t/lib-log-graph.sh
@@ -12,13 +12,13 @@ sanitize_log_output () {
 lib_test_cmp_graph () {
 	git log --graph "$@" >output &&
 	sed 's/ *$//' >output.sanitized <output &&
-	test_i18ncmp expect output.sanitized
+	test_cmp expect output.sanitized
 }
 
 lib_test_cmp_short_graph () {
 	git log --graph --pretty=short "$@" >output &&
 	sanitize_log_output >output.sanitized <output &&
-	test_i18ncmp expect output.sanitized
+	test_cmp expect output.sanitized
 }
 
 lib_test_cmp_colored_graph () {
diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh
index bd3fa3c6da..e04b5c4ba3 100644
--- a/t/lib-submodule-update.sh
+++ b/t/lib-submodule-update.sh
@@ -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
 		)
diff --git a/t/t5411/test-0026-push-options.sh b/t/t5411/test-0026-push-options.sh
index e88edb16a4..a03f9ac5c4 100644
--- a/t/t5411/test-0026-push-options.sh
+++ b/t/t5411/test-0026-push-options.sh
@@ -18,8 +18,7 @@ test_expect_success "proc-receive: not support push options ($PROTOCOL)" '
 		HEAD:refs/for/main/topic \
 		>out 2>&1 &&
 	make_user_friendly_and_stable_output <out >actual &&
-	test_i18ngrep "fatal: the receiving end does not support push options" \
-		actual &&
+	grep "fatal: the receiving end does not support push options" actual &&
 	git -C "$upstream" show-ref >out &&
 	make_user_friendly_and_stable_output <out >actual &&
 	cat >expect <<-EOF &&
diff --git a/t/t5411/test-0027-push-options--porcelain.sh b/t/t5411/test-0027-push-options--porcelain.sh
index 3a6561b5ea..e734247d69 100644
--- a/t/t5411/test-0027-push-options--porcelain.sh
+++ b/t/t5411/test-0027-push-options--porcelain.sh
@@ -19,8 +19,7 @@ test_expect_success "proc-receive: not support push options ($PROTOCOL/porcelain
 		HEAD:refs/for/main/topic \
 		>out 2>&1 &&
 	make_user_friendly_and_stable_output <out >actual &&
-	test_i18ngrep "fatal: the receiving end does not support push options" \
-		actual &&
+	grep "fatal: the receiving end does not support push options" actual &&
 	git -C "$upstream" show-ref >out &&
 	make_user_friendly_and_stable_output <out >actual &&
 	cat >expect <<-EOF &&
-- 
2.29.2.222.g5d2a92d10f8