1 ## Test moving files after a file.
10 RUN: llvm-ar rc %t-one.a %t1.txt %t2.txt %t3.txt
11 RUN: llvm-ar mb %t2.txt %t-one.a %t3.txt
12 RUN: llvm-ar t %t-one.a | FileCheck %s --check-prefix=ONE
20 RUN: llvm-ar rc %t-front.a %t1.txt %t2.txt %t3.txt
21 RUN: llvm-ar mb %t1.txt %t-front.a %t3.txt
22 RUN: llvm-ar t %t-front.a | FileCheck %s --check-prefix=FRONT
28 # Move multiple files:
29 RUN: rm -f %t-multiple.a
30 RUN: llvm-ar rc %t-multiple.a %t1.txt %t2.txt %t3.txt %t4.txt
31 RUN: llvm-ar mb %t2.txt %t-multiple.a %t4.txt %t3.txt
32 RUN: llvm-ar t %t-multiple.a | FileCheck %s --check-prefix=MULTIPLE
39 # Move before 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 mb 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 # Move file to 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 mb %t3.txt %t-position.a %t2.txt
55 RUN: llvm-ar t %t-position.a | FileCheck %s --check-prefix=POSITION
61 # Move file after itself:
63 RUN: llvm-ar rc %t-same.a %t1.txt %t2.txt %t3.txt
64 RUN: llvm-ar mb %t2.txt %t-same.a %t2.txt
65 RUN: llvm-ar t %t-same.a | FileCheck %s --check-prefix=SAME