1 Test the exact archive format. In particular, test which file names use the
7 RUN: echo -n bar. > 0123456789abcde
8 RUN: echo -n zed. > 0123456789abcdef
10 RUN: echo -n bar2 > foo/0123456789abcde
11 RUN: echo -n zed2 > foo/0123456789abcdef
14 RUN: llvm-ar --format=gnu rc %t.a 0123456789abcde 0123456789abcdef foo/0123456789abcde foo/0123456789abcdef
15 RUN: cat %t.a | FileCheck -strict-whitespace %s
19 CHECK-NEXT: 0123456789abcdef/
20 CHECK-NEXT: 0123456789abcdef/
21 CHECK-NEXT: 0123456789abcde/0 0 0 644 4 `
23 CHECK-SAME: /0 0 0 0 644 4 `
25 CHECK-SAME: 0123456789abcde/0 0 0 644 4 `
27 CHECK-SAME: /18 0 0 0 644 4 `
31 RUN: llvm-ar --format=bsd rc %t.a 0123456789abcde 0123456789abcdef
32 RUN: cat %t.a | FileCheck -strict-whitespace --check-prefix=BSD %s
35 BSD-NEXT: #1/20 0 0 0 644 24 `
36 BSD-NEXT: 0123456789abcde{{.....}}bar.
37 BSD-SAME: #1/16 0 0 0 644 20 `
38 BSD-NEXT: 0123456789abcdefzed.
41 RUN: llvm-ar --format=gnu rcT test.a 0123456789abcde 0123456789abcdef
42 RUN: cat test.a | FileCheck -strict-whitespace --check-prefix=THIN %s
45 THIN-NEXT: 0123456789abcde/
46 THIN-NEXT: 0123456789abcdef/{{$}}
48 THIN: /0 0 0 0 644 4 `
49 THIN-NEXT: /17 0 0 0 644 4 `
53 RUN: llvm-ar --format=gnu rcT bar/test.a 0123456789abcde 0123456789abcdef foo/0123456789abcde foo/0123456789abcdef
54 RUN: cat bar/test.a | FileCheck -strict-whitespace --check-prefix=THIN-PATH %s
56 THIN-PATH-NEXT: // 90 `
57 THIN-PATH-NEXT: ..{{/|\\}}0123456789abcde/
58 THIN-PATH-NEXT: ..{{/|\\}}0123456789abcdef/
59 THIN-PATH-NEXT: ..{{/|\\}}foo{{/|\\}}0123456789abcde/
60 THIN-PATH-NEXT: ..{{/|\\}}foo{{/|\\}}0123456789abcdef/
61 THIN-PATH-NEXT: /0 0 0 0 644 4 `
62 THIN-PATH-NEXT: /20 0 0 0 644 4 `
63 THIN-PATH-NEXT: /41 0 0 0 644 4 `
64 THIN-PATH-NEXT: /65 0 0 0 644 4 `