[PATCH 07/11] t0027: mark a function as requiring the C locale
- From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Jan 12, 2021, 08:47 UTC
- Message-ID
- <5aa21ffc7f94262a5c31fca80d998115d3a5522f.1610441263.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.836.git.1610441262.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>
The `check_warning` function uses regular expressions matching English text, it therefore won't work reliably with anything but the C locale.
In particular, we won't be able to match the needle 'in' under GETTEXT_POISON=rot13.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> --- t/t0027-auto-crlf.sh | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh index 9fcd56fab37..baa5c6f435b 100755 --- a/t/t0027-auto-crlf.sh +++ b/t/t0027-auto-crlf.sh @@ -76,6 +76,9 @@ create_NNO_MIX_files () { } check_warning () { + # The `grep` and `sed` below expect the locale to be "C" + test_have_prereq C_LOCALE_OUTPUT || return 0 + case "$1" in LF_CRLF) echo "warning: LF will be replaced by CRLF" >"$2".expect ;; CRLF_LF) echo "warning: CRLF will be replaced by LF" >"$2".expect ;;
-- gitgitgadget