llvm-project/llvm/test/Object/archive-darwin-duplicates.test
Aiden Grossman 6ba25c1a56
[llvm] Remove uses of %T in tests (#151621)
This patch removes all uses of %T from within LLVM tests. %T has been
deprecated for about seven years and use is not advised given it is not
unique per test and can thus lead to races. The goal of this is to
eventually remove support for %T from lit.
2025-08-01 08:24:56 -07:00

22 lines
749 B
Plaintext

Test that darwin archives are created with distinct (name,timestamp) pairs.
The two members with the duplicated name "test.o" must have unique
non-zero timestamps, while baz.o, being unique, remains a zero
timestamp.
RUN: mkdir -p %t.dir/sub1
RUN: printf test > %t.dir/test.o
RUN: printf sub1/test > %t.dir/sub1/test.o
RUN: printf baz > %t.dir/baz.o
RUN: rm -f %t.a
RUN: llvm-ar --format=darwin rcs %t.a %t.dir/sub1/test.o %t.dir/test.o %t.dir/baz.o
RUN: FileCheck -strict-whitespace %s < %t.a
CHECK:#1/12 1 0 0 644 28 `
CHECK-NEXT:test.o
CHECK:#1/12 2 0 0 644 20 `
CHECK-NEXT:test.o
CHECK:#1/12 0 0 0 644 20 `
CHECK-NEXT:baz.o