Skip to content

Commit b1e0798

Browse files
avargitster
authored andcommitted
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 d162b25 (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 21e5ad5 (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a926c4b commit b1e0798

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

t/t0020-crlf.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,8 @@ test_expect_success 'safecrlf: print warning only once' '
8787
git commit -m "nowarn" &&
8888
for w in Oh here is CRLFQ in text; do echo $w; done | q_to_cr >doublewarn &&
8989
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
9492
'
9593

9694

t/t9003-help-autocorrect.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,8 @@ test_expect_success 'autocorrect can be declined altogether' '
5656
git config help.autocorrect never &&
5757
5858
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
6461
'
6562

6663
test_done

t/test-lib.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,11 +1519,6 @@ test -n "$USE_LIBPCRE2" && test_set_prereq PCRE
15191519
test -n "$USE_LIBPCRE2" && test_set_prereq LIBPCRE2
15201520
test -z "$NO_GETTEXT" && test_set_prereq GETTEXT
15211521

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-
15271522
if test -z "$GIT_TEST_CHECK_CACHE_TREE"
15281523
then
15291524
GIT_TEST_CHECK_CACHE_TREE=true

0 commit comments

Comments
 (0)