Revert [test] Remove locale dependency for mri-utf8.test
authorOwen Reynolds <gbreynoo@gmail.com>
Fri, 4 Oct 2019 11:12:37 +0000 (11:12 +0000)
committerOwen Reynolds <gbreynoo@gmail.com>
Fri, 4 Oct 2019 11:12:37 +0000 (11:12 +0000)
This reverts r373700 (git commit b455ebf921c5c940c2366bec226959e3a4127fee)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373728 91177308-0d34-0410-b5e6-96231b3b80d8

test/tools/llvm-ar/mri-utf8.test

index af2be04111b2e2044e3c36894c1255566deb52f4..6499996007473d62348975e8c4d9afc09b177c14 100644 (file)
@@ -12,4 +12,8 @@ RUN: echo "SAVE" >> %t/script.mri
 RUN: llvm-ar -M < %t/script.mri
 RUN: cd %t/extracted && llvm-ar x %t/mri.ar
 
-RUN: %python -c "assert open(b'\xC2\xA3.txt', 'rb').read() == b'contents\n'"
+# This works around problems launching processess that
+# include arguments with non-ascii characters.
+# Python on Linux defaults to ASCII encoding unless the
+# environment specifies otherwise, so it is explicitly set.
+RUN: env LANG=en_US.UTF-8 %python -c "assert open(u'\U000000A3.txt', 'rb').read() == b'contents\n'"