1 ## Test extract operation.
4 # RUN: rm -rf %t && mkdir -p %t/extracted/
6 ## Extracting from an empty archive should not warn or error:
7 # RUN: llvm-ar cr %t/empty.a
8 # RUN: llvm-ar xv %t/empty.a 2>&1 | count 0
10 # RUN: echo filea > %t/a.txt
11 # RUN: echo fileb > %t/b.txt
12 # RUN: llvm-ar rc %t/archive.a %t/a.txt %t/b.txt
15 # RUN: cd %t/extracted && llvm-ar xv %t/archive.a a.txt | FileCheck %s --check-prefix=A
16 # RUN: diff %t/a.txt %t/extracted/a.txt
20 # RUN: rm %t/extracted/a.txt
21 # RUN: cd %t/extracted && llvm-ar xv %t/archive.a | FileCheck %s --check-prefix=AB
22 # RUN: diff %t/a.txt %t/extracted/a.txt
23 # RUN: diff %t/b.txt %t/extracted/b.txt
28 # RUN: llvm-ar Trc %t/thin-archive.a
29 # RUN: not llvm-ar x %t/thin-archive.a 2>&1 | FileCheck %s --check-prefix=THIN
30 # THIN: extracting from a thin archive is not supported
32 ## No output if 'v' is not specified.
34 # RUN: llvm-ar x %t/archive.a 2>&1 | count 0
35 # RUN: diff %t/a.txt %t/extracted/a.txt
36 # RUN: diff %t/b.txt %t/extracted/b.txt