From: Johannes Schindelin <redacted>
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 <redacted>
---
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