brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · f2a6bdd Raw
60 lines · plain
1## Test inserting files before a file.2 3RUN: touch %t1.txt4RUN: touch %t2.txt5RUN: touch %t3.txt6RUN: touch %t4.txt7 8# Insert one file:9RUN: rm -f %t-one.a10RUN: llvm-ar rc %t-one.a %t1.txt %t2.txt11RUN: llvm-ar rb %t2.txt %t-one.a %t3.txt12RUN: llvm-ar t %t-one.a | FileCheck %s --check-prefix=ONE13 14ONE:      1.txt15ONE-NEXT: 3.txt16ONE-NEXT: 2.txt17 18# Insert file at front:19RUN: rm -f %t-front.a20RUN: llvm-ar rc %t-front.a %t1.txt %t2.txt21RUN: llvm-ar rb %t1.txt %t-front.a %t3.txt22RUN: llvm-ar t %t-front.a | FileCheck %s --check-prefix=FRONT23 24FRONT:      3.txt25FRONT-NEXT: 1.txt26FRONT-NEXT: 2.txt27 28# Insert multiple files:29RUN: rm -f %t-multiple.a30RUN: llvm-ar rc %t-multiple.a %t1.txt %t2.txt31RUN: llvm-ar rb %t2.txt %t-multiple.a %t4.txt %t3.txt32RUN: llvm-ar t %t-multiple.a | FileCheck %s --check-prefix=MULTIPLE33 34MULTIPLE:      1.txt35MULTIPLE-NEXT: 4.txt36MULTIPLE-NEXT: 3.txt37MULTIPLE-NEXT: 2.txt38 39# Insert before an invalid file:40RUN: rm -f %t-invalid.a41RUN: llvm-ar rc %t-invalid.a %t1.txt %t2.txt %t3.txt42RUN: not llvm-ar rb invalid.txt %t-invalid.a %t2.txt 2>&1 \43RUN:   | FileCheck %s --check-prefix=ERROR44RUN: llvm-ar t %t-invalid.a | FileCheck %s --check-prefix=INVALID45 46ERROR: error: insertion point not found47INVALID:      1.txt48INVALID-NEXT: 2.txt49INVALID-NEXT: 3.txt50 51# Insert file at the same position:52RUN: rm -f %t-position.a53RUN: llvm-ar rc %t-position.a %t1.txt %t2.txt %t3.txt54RUN: llvm-ar rb %t3.txt %t-position.a %t2.txt55RUN: llvm-ar t %t-position.a | FileCheck %s --check-prefix=POSITION56 57POSITION:      1.txt58POSITION-NEXT: 2.txt59POSITION-NEXT: 3.txt60