1 ## Test inserting files after a file.
10 RUN: llvm-ar rc %t-one.a %t1.txt %t2.txt
11 RUN: llvm-ar ra %t1.txt %t-one.a %t3.txt
12 RUN: llvm-ar t %t-one.a | FileCheck %s --check-prefix=ONE
18 # Insert file at back:
20 RUN: llvm-ar rc %t-back.a %t1.txt %t2.txt
21 RUN: llvm-ar ra %t2.txt %t-back.a %t3.txt
22 RUN: llvm-ar t %t-back.a | FileCheck %s --check-prefix=BACK
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 ra %t1.txt %t-multiple.a %t4.txt %t3.txt
32 RUN: llvm-ar t %t-multiple.a | FileCheck %s --check-prefix=MULTIPLE
39 # Insert after 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 ra 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 ra %t1.txt %t-position.a %t2.txt
55 RUN: llvm-ar t %t-position.a | FileCheck %s --check-prefix=POSITION