1 ## Show that CREATE/CREATETHIN overwrite existing files appropriately.
4 # RUN: split-file %s %t
7 ## Show that an existing file that is not an archive is overwritten by CREATE.
9 # RUN: llvm-ar -M < create.mri
10 # RUN: FileCheck --input-file=test.a %s --check-prefixes=ARCH,TWO
12 ## Show that an existing file that is not an archive is overwritten by CREATETHIN.
15 # RUN: llvm-ar --format=gnu -M < createthin.mri
16 # RUN: FileCheck --input-file=test.a %s --check-prefixes=THIN,TWO
18 ## Show that an existing regular archive is overwritten by CREATE.
20 # RUN: llvm-ar cr test.a 1.txt
21 # RUN: llvm-ar -M < create.mri
22 # RUN: llvm-ar tv test.a
23 # RUN: FileCheck --input-file=test.a %s --check-prefixes=ARCH,TWO --implicit-check-not=1.txt
25 ## Show that an existing regular archive is overwritten by CREATETHIN.
27 # RUN: llvm-ar --format=gnu cr test.a 1.txt
28 # RUN: llvm-ar --format=gnu -M < createthin.mri
29 # RUN: FileCheck --input-file=test.a %s --check-prefixes=THIN,TWO --implicit-check-not=1.txt
31 ## Show that an existing thin archive is overwritten by CREATE.
33 # RUN: llvm-ar --format=gnu crT test.a 1.txt
34 # RUN: llvm-ar --format=gnu -M < create.mri
35 # RUN: FileCheck --input-file=test.a %s --check-prefixes=ARCH,TWO --implicit-check-not=1.txt
37 ## Show that an existing thin archive is overwritten by CREATETHIN.
39 # RUN: llvm-ar --format=gnu crT test.a 1.txt
40 # RUN: llvm-ar --format=gnu -M < createthin.mri
41 # RUN: FileCheck --input-file=test.a %s --check-prefixes=THIN,TWO --implicit-check-not=1.txt
43 ## Show that the output is not overwritten without a SAVE.
45 # RUN: llvm-ar --format=gnu crT test.a 1.txt
46 # RUN: llvm-ar --format=gnu -M < nosave.mri
47 # RUN: FileCheck --input-file=test.a %s --check-prefixes=THIN,ONE --implicit-check-not=2.txt
49 # ARCH: {{!<arch>|<bigaf>}}