]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: env-s.pl: avoid spurious failure on OS X
authorJim Meyering <meyering@fb.com>
Mon, 20 Sep 2021 05:44:25 +0000 (22:44 -0700)
committerJim Meyering <meyering@fb.com>
Mon, 20 Sep 2021 17:01:53 +0000 (10:01 -0700)
* tests/misc/env-S.pl: The __CF_USER_TEXT_ENCODING envvar
would cause many of these sub-tests to fail. Ignore it.

tests/misc/env-S.pl

index 73dcb5cfe130c35bbc677bcb61000f3ab450f159..81d70c9fe5c62196ed91409cc8b698f2e4f8ad3d 100755 (executable)
@@ -30,6 +30,12 @@ $env = $1;
 # Turn off localization of executable's output.
 @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
 
+# This envvar is somehow set at least on macOS 11.6, and would
+# otherwise cause failure of q*, t* and more tests below.  Ignore it.
+my $cf = '__CF_USER_TEXT_ENCODING';
+exists $ENV{$cf}
+  and $env .= " -u$cf";
+
 my @Tests =
     (
      # Test combination of -S and regular arguments