brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · a3f51a6 Raw
60 lines · plain
1## Test inserting files after 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 ra %t1.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 back:19RUN: rm -f %t-back.a20RUN: llvm-ar rc %t-back.a %t1.txt %t2.txt21RUN: llvm-ar ra %t2.txt %t-back.a %t3.txt22RUN: llvm-ar t %t-back.a | FileCheck %s --check-prefix=BACK23 24BACK:      1.txt25BACK-NEXT: 2.txt26BACK-NEXT: 3.txt27 28# Insert multiple files:29RUN: rm -f %t-multiple.a30RUN: llvm-ar rc %t-multiple.a %t1.txt %t2.txt31RUN: llvm-ar ra %t1.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 after invalid file:40RUN: rm -f %t-invalid.a41RUN: llvm-ar rc %t-invalid.a %t1.txt %t2.txt %t3.txt42RUN: not llvm-ar ra 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 ra %t1.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