xref: /llvm-project/llvm/test/tools/llvm-ar/flatten-thin-archive.test (revision fe3b621f05e706fb04dec121c136b6de82a9e277)
1## This test creates a thin archive that contains a thin archive, a regular
2## archive, and a file.
3##
4## The inner thin archive should be flattened, but the regular archive should
5## not. The order of members in the archive should match the input order, with
6## flattened members appearing together.
7
8# RUN: touch %t-a.txt %t-b.txt %t-c.txt %t-d.txt %t-e.txt
9# RUN: rm -f %t-a-plus-b.a %t-d-plus-e.a %t.a
10# RUN: llvm-ar rcs --thin %t-a-plus-b.a %t-a.txt %t-b.txt
11# RUN: llvm-ar rcs %t-d-plus-e.a %t-d.txt %t-e.txt
12# RUN: llvm-ar rcs --thin %t.a %t-a-plus-b.a %t-c.txt %t-d-plus-e.a
13# RUN: FileCheck --input-file=%t.a %s
14
15# CHECK:      !<thin>
16# CHECK:      a.txt
17# CHECK-NEXT: b.txt
18# CHECK-NEXT: c.txt
19# CHECK-NEXT: -d-plus-e.a
20