1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| # Test non-ascii archive members
# XFAIL: system-darwin
RUN: rm -rf %t && mkdir -p %t/extracted
RUN: echo "contents" > %t/£.txt
RUN: echo "CREATE %t/mri.ar" > %t/script.mri
RUN: echo "ADDMOD %t/£.txt" >> %t/script.mri
RUN: echo "SAVE" >> %t/script.mri
RUN: llvm-ar -M < %t/script.mri
RUN: cd %t/extracted && llvm-ar x %t/mri.ar
# 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.
# The reliance the test has on this locale is not ideal,
# however alternate solutions have been difficult due to
# behaviour differences with python 2 vs python 3,
# and linux vs windows.
RUN: env LANG=en_US.UTF-8 %python -c "assert open(u'\U000000A3.txt', 'rb').read() == b'contents\n'"
|