1 # Test non-ascii archive members
4 RUN: rm -rf %t && mkdir -p %t/extracted
6 RUN: echo "contents" > %t/£.txt
8 RUN: echo "CREATE %t/mri.ar" > %t/script.mri
9 RUN: echo "ADDMOD %t/£.txt" >> %t/script.mri
10 RUN: echo "SAVE" >> %t/script.mri
12 RUN: llvm-ar -M < %t/script.mri
13 RUN: cd %t/extracted && llvm-ar x %t/mri.ar
15 # This works around problems launching processess that
16 # include arguments with non-ascii characters.
17 # Python on Linux defaults to ASCII encoding unless the
18 # environment specifies otherwise, so it is explicitly set.
19 # The reliance the test has on this locale is not ideal,
20 # however alternate solutions have been difficult due to
21 # behaviour differences with python 2 vs python 3,
22 # and linux vs windows.
23 RUN: env LANG=en_US.UTF-8 %python -c "assert open(u'\U000000A3.txt', 'rb').read() == b'contents\n'"