From 677fb3e4aba37bc5c6c7a13908e1f5d0f0ded743 Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?=
Date: Wed, 23 Feb 2022 17:27:15 +0000 Subject: [PATCH] tests: improve compat with macOS * tests/misc/wc-nbsp.sh: Only the en_US.iso8859-1 form is accepted on macOS 10.15.7 at least. GNU/Linux also accepts ISO-8859-1 (and canonicalizes the charmap to this). --- tests/misc/wc-nbsp.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/misc/wc-nbsp.sh b/tests/misc/wc-nbsp.sh index 6721b2b485..7b2658f6ab 100755 --- a/tests/misc/wc-nbsp.sh +++ b/tests/misc/wc-nbsp.sh @@ -31,8 +31,8 @@ check_word_sep() { fi } -export LC_ALL=en_US.ISO-8859-1 -if test "$(locale charmap 2>/dev/null)" = ISO-8859-1; then +export LC_ALL=en_US.iso8859-1 # only lowercase form works on macOS 10.15.7 +if test "$(locale charmap 2>/dev/null | sed 's/iso/ISO-/')" = ISO-8859-1; then check_word_sep '\xA0' fi -- 2.47.2