1 ## Test inserting files before a file.
10 RUN: llvm-ar rc %t-one.a %t1.txt %t2.txt
11 RUN: llvm-ar rb %t2.txt %t-one.a %t3.txt
12 RUN: llvm-ar t %t-one.a | FileCheck %s --check-prefix=ONE
18 # Insert file at front:
20 RUN: llvm-ar rc %t-front.a %t1.txt %t2.txt
21 RUN: llvm-ar rb %t1.txt %t-front.a %t3.txt
22 RUN: llvm-ar t %t-front.a | FileCheck %s --check-prefix=FRONT
28 # Insert multiple files:
29 RUN: rm -f %t-multiple.a
30 RUN: llvm-ar rc %t-multiple.a %t1.txt %t2.txt
31 RUN: llvm-ar rb %t2.txt %t-multiple.a %t4.txt %t3.txt
32 RUN: llvm-ar t %t-multiple.a | FileCheck %s --check-prefix=MULTIPLE
39 # Insert before an invalid file:
40 RUN: rm -f %t-invalid.a
41 RUN: llvm-ar rc %t-invalid.a %t1.txt %t2.txt %t3.txt
42 RUN: not llvm-ar rb invalid.txt %t-invalid.a %t2.txt 2>&1 \
43 RUN: | FileCheck %s --check-prefix=ERROR
44 RUN: llvm-ar t %t-invalid.a | FileCheck %s --check-prefix=INVALID
46 ERROR: error: insertion point not found
51 # Insert file at the same position:
52 RUN: rm -f %t-position.a
53 RUN: llvm-ar rc %t-position.a %t1.txt %t2.txt %t3.txt
54 RUN: llvm-ar rb %t3.txt %t-position.a %t2.txt
55 RUN: llvm-ar t %t-position.a | FileCheck %s --check-prefix=POSITION