1 Test the exact archive format. In particular, test which file names use the 2 string table or not. 3 4 RUN: mkdir -p %t 5 RUN: cd %t 6 7 RUN: echo -n bar. > 0123456789abcde 8 RUN: echo -n zed. > 0123456789abcdef 9 RUN: mkdir -p foo 10 RUN: echo -n bar2 > foo/0123456789abcde 11 RUN: echo -n zed2 > foo/0123456789abcdef 12 13 RUN: rm -f %t.a 14 RUN: llvm-ar --format=gnu rc %t.a 0123456789abcde 0123456789abcdef foo/0123456789abcde foo/0123456789abcdef 15 RUN: cat %t.a | FileCheck -strict-whitespace %s 16 17 CHECK: !<arch> 18 CHECK-NEXT: // 36 ` 19 CHECK-NEXT: 0123456789abcdef/ 20 CHECK-NEXT: 0123456789abcdef/ 21 CHECK-NEXT: 0123456789abcde/0 0 0 644 4 ` 22 CHECK-NEXT: bar. 23 CHECK-SAME: /0 0 0 0 644 4 ` 24 CHECK-NEXT: zed. 25 CHECK-SAME: 0123456789abcde/0 0 0 644 4 ` 26 CHECK-NEXT: bar2 27 CHECK-SAME: /18 0 0 0 644 4 ` 28 CHECK-NEXT: zed2 29 30 RUN: rm -f %t.a 31 RUN: llvm-ar --format=bsd rc %t.a 0123456789abcde 0123456789abcdef 32 RUN: cat %t.a | FileCheck -strict-whitespace --check-prefix=BSD %s 33 34 BSD: !<arch> 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. 39 40 RUN: rm -f test.a 41 RUN: llvm-ar --format=gnu rcT test.a 0123456789abcde 0123456789abcdef 42 RUN: cat test.a | FileCheck -strict-whitespace --check-prefix=THIN %s 43 THIN: !<thin> 44 THIN-NEXT: // 36 ` 45 THIN-NEXT: 0123456789abcde/ 46 THIN-NEXT: 0123456789abcdef/{{$}} 47 THIN: {{^$}} 48 THIN: /0 0 0 0 644 4 ` 49 THIN-NEXT: /17 0 0 0 644 4 ` 50 51 RUN: mkdir -p bar 52 RUN: rm -f bar/test.a 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 55 THIN-PATH: !<thin> 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 ` 65