]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: improve compat with macOS
authorPádraig Brady <P@draigBrady.com>
Wed, 23 Feb 2022 17:27:15 +0000 (17:27 +0000)
committerPádraig Brady <P@draigBrady.com>
Thu, 24 Feb 2022 13:58:06 +0000 (13:58 +0000)
* 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

index 6721b2b485880f9576c8cea61d7a8b925dd4aa06..7b2658f6ab42eb3db073041775a48a32017c585f 100755 (executable)
@@ -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