xref: /llvm-project/llvm/test/tools/llvm-ar/macho-edit.test (revision 066243057fc2ae45ae6bbc2f4874ca1f84c3a3ff)
1## Make sure the darwin format specifics are preserved when updating archives.
2
3# RUN: rm -rf %t && mkdir -p %t
4# RUN: yaml2obj %p/Inputs/macho.yaml > %t/dup.o
5
6## Create the archive with a duplicate object to ensure that darwin specific
7## incrementing timestamps are used.
8# RUN: llvm-ar --format=darwin crD %t/lib.a %t/dup.o %t/dup.o
9# RUN: cp %t/lib.a %t/lib.copy.a
10
11## Replace an object file in the archive to force a re-write.
12# RUN: llvm-ar crD %t/lib.a %t/dup.o
13# RUN: obj2yaml %t/lib.a | FileCheck --implicit-check-not=LastModified %s
14
15# CHECK: LastModified: '1'
16# CHECK: LastModified: '2'
17