tests: remove last uses of C_LOCALE_OUTPUT

Remove the last uses of the C_LOCALE_OUTPUT prerequisite as well as the prerequisite itself. This is a follow-up to d162b25f956 (tests: remove support for GIT_TEST_GETTEXT_POISON, 2021-01-20), as well as the preceding commit where we removed the simpler uses of C_LOCALE_OUTPUT. Here I'm slightly refactoring a test added in 21e5ad50fc5 (safecrlf: Add mechanism to warn about irreversible crlf conversions, 2008-02-06), as well as getting rid of another "test_have_prereq C_LOCALE_OUTPUT" use. I'm not leaving the prerequisite itself in place for in-flight changes as there currently are none that introduce new tests that rely on it, and because C_LOCALE_OUTPUT is currently a noop on the master branch we likely won't have any new submissions that use it. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Feb 11, 2021 at 02:53 UTC b1e079807b3d3c3592c40cab8bc0379879b6fad5
3 files changed +4 -14
t/t0020-crlf.sh
+2 -4
@@ -87,10 +87,8 @@ test_expect_success 'safecrlf: print warning only once' '
87 git commit -m "nowarn" &&
88 for w in Oh here is CRLFQ in text; do echo $w; done | q_to_cr >doublewarn &&
89 git add doublewarn 2>err &&
90 - if test_have_prereq C_LOCALE_OUTPUT
91 - then
92 - test $(grep "CRLF will be replaced by LF" err | wc -l) = 1
93 - fi
90 + grep "CRLF will be replaced by LF" err >err.warnings &&
91 + test_line_count = 1 err.warnings
92 '
93
94
t/t9003-help-autocorrect.sh
+2 -5
@@ -56,11 +56,8 @@ test_expect_success 'autocorrect can be declined altogether' '
56 git config help.autocorrect never &&
57
58 test_must_fail git lfg 2>actual &&
59 - if test_have_prereq C_LOCALE_OUTPUT
60 - then
61 - grep "is not a git command" actual &&
62 - test_line_count = 1 actual
63 - fi
59 + grep "is not a git command" actual &&
60 + test_line_count = 1 actual
61 '
62
63 test_done
t/test-lib.sh
-5
@@ -1519,11 +1519,6 @@ test -n "$USE_LIBPCRE2" && test_set_prereq PCRE
1519 test -n "$USE_LIBPCRE2" && test_set_prereq LIBPCRE2
1520 test -z "$NO_GETTEXT" && test_set_prereq GETTEXT
1521
1522 -# Used to be used for GIT_TEST_GETTEXT_POISON=false. Only here as a
1523 -# shim for other in-flight changes. Should not be used and will be
1524 -# removed soon.
1525 -test_set_prereq C_LOCALE_OUTPUT
1526 -
1522 if test -z "$GIT_TEST_CHECK_CACHE_TREE"
1523 then
1524 GIT_TEST_CHECK_CACHE_TREE=true