Rafael Espindola | 0aac01b | 2013-07-13 04:14:13 +0000 | [diff] [blame] | 1 | Test the exact archive format. In particular, test which file names use the |
| 2 | string table or not. |
| 3 | |
Rafael Espindola | 0aac01b | 2013-07-13 04:14:13 +0000 | [diff] [blame] | 4 | RUN: mkdir -p %t |
| 5 | RUN: cd %t |
| 6 | |
NAKAMURA Takumi | 10d576d | 2015-03-03 15:54:48 +0000 | [diff] [blame] | 7 | RUN: echo -n bar. > 0123456789abcde |
| 8 | RUN: echo -n zed. > 0123456789abcdef |
Rafael Espindola | 0aac01b | 2013-07-13 04:14:13 +0000 | [diff] [blame] | 9 | |
Rafael Espindola | 6a8e86f | 2015-07-13 20:38:09 +0000 | [diff] [blame] | 10 | RUN: rm -f %t.a |
| 11 | RUN: llvm-ar --format=gnu rc %t.a 0123456789abcde 0123456789abcdef |
| 12 | RUN: cat %t.a | FileCheck -strict-whitespace %s |
Rafael Espindola | 0aac01b | 2013-07-13 04:14:13 +0000 | [diff] [blame] | 13 | |
| 14 | CHECK: !<arch> |
| 15 | CHECK-NEXT: // 18 ` |
| 16 | CHECK-NEXT: 0123456789abcdef/ |
Rafael Espindola | 6a8e86f | 2015-07-13 20:38:09 +0000 | [diff] [blame] | 17 | CHECK-NEXT: 0123456789abcde/0 0 0 644 4 ` |
| 18 | CHECK-NEXT: bar./0 0 0 0 644 4 ` |
NAKAMURA Takumi | 10d576d | 2015-03-03 15:54:48 +0000 | [diff] [blame] | 19 | CHECK-NEXT: zed. |
Rafael Espindola | a2ed0b0 | 2015-07-08 20:47:32 +0000 | [diff] [blame] | 20 | |
Rafael Espindola | 6a8e86f | 2015-07-13 20:38:09 +0000 | [diff] [blame] | 21 | RUN: rm -f %t.a |
| 22 | RUN: llvm-ar --format=bsd rc %t.a 0123456789abcde 0123456789abcdef |
| 23 | RUN: cat %t.a | FileCheck -strict-whitespace --check-prefix=BSD %s |
Rafael Espindola | a2ed0b0 | 2015-07-08 20:47:32 +0000 | [diff] [blame] | 24 | |
| 25 | BSD: !<arch> |
Rafael Espindola | 6a8e86f | 2015-07-13 20:38:09 +0000 | [diff] [blame] | 26 | BSD-NEXT: #1/20 0 0 0 644 24 ` |
Rafael Espindola | a2ed0b0 | 2015-07-08 20:47:32 +0000 | [diff] [blame] | 27 | BSD-NEXT: 0123456789abcde{{.....}}bar. |
Rafael Espindola | 6a8e86f | 2015-07-13 20:38:09 +0000 | [diff] [blame] | 28 | BSD-SAME: #1/16 0 0 0 644 20 ` |
Rafael Espindola | a2ed0b0 | 2015-07-08 20:47:32 +0000 | [diff] [blame] | 29 | BSD-NEXT: 0123456789abcdefzed. |
Rafael Espindola | e649258 | 2015-07-15 05:47:46 +0000 | [diff] [blame^] | 30 | |
| 31 | RUN: rm -f %t.a |
| 32 | RUN: llvm-ar --format=gnu rcT %t.a 0123456789abcde 0123456789abcdef |
| 33 | RUN: cat %t.a | FileCheck -strict-whitespace --check-prefix=THIN %s |
| 34 | THIN: !<thin> |
| 35 | THIN-NEXT: // 36 ` |
| 36 | THIN-NEXT: 0123456789abcde/ |
| 37 | THIN-NEXT: 0123456789abcdef/{{$}} |
| 38 | THIN: {{^$}} |
| 39 | THIN: /0 0 0 0 644 4 ` |
| 40 | THIN-NEXT: /17 0 0 0 644 4 ` |