xref: /llvm-project/llvm/test/tools/llvm-ar/mri-nonascii.test (revision 2ab260eecfab56aabc9cff979c1618859d3b883d)
1## Test non-ascii archive members
2
3# RUN: rm -rf %t && mkdir -p %t/extracted
4# RUN: cd %t
5
6## Note: lit's Python will read this UTF-8 encoded mri-nonascii.txt file,
7## decode it to unicode. The filename in the redirection below will then
8## be encoded in the system's filename encoding (e.g. UTF-16 for
9## Microsoft Windows).
10# RUN: echo "contents" > £.txt
11# RUN: echo "contents" > €.txt
12# RUN: llvm-ar -rc ¥.a €.txt
13
14# RUN: echo "CREATE mri.ar" > script.mri
15# RUN: echo "ADDMOD £.txt" >> script.mri
16# RUN: echo "ADDLIB ¥.a" >> script.mri
17# RUN: echo "SAVE" >> script.mri
18
19# RUN: llvm-ar -M < script.mri
20# RUN: cd %t/extracted && llvm-ar x %t/mri.ar
21
22## Same as above.
23# RUN: FileCheck --strict-whitespace %s <£.txt
24# RUN: FileCheck --strict-whitespace %s <€.txt
25# CHECK:{{^}}
26# CHECK-SAME:{{^}}contents{{$}}
27