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 | |
| 10 | RUN: rm -f test.a |
Rafael Espindola | 2535ea0 | 2015-07-09 20:12:50 +0000 | [diff] [blame^] | 11 | RUN: llvm-ar --format=gnu rc test.a 0123456789abcde 0123456789abcdef |
Rafael Espindola | 0aac01b | 2013-07-13 04:14:13 +0000 | [diff] [blame] | 12 | RUN: cat test.a | FileCheck -strict-whitespace %s |
| 13 | |
| 14 | CHECK: !<arch> |
| 15 | CHECK-NEXT: // 18 ` |
| 16 | CHECK-NEXT: 0123456789abcdef/ |
Benjamin Kramer | c74fcc9 | 2013-07-13 15:21:39 +0000 | [diff] [blame] | 17 | CHECK-NEXT: 0123456789abcde/{{................................}}4 ` |
NAKAMURA Takumi | 10d576d | 2015-03-03 15:54:48 +0000 | [diff] [blame] | 18 | CHECK-NEXT: bar./0 {{................................}}4 ` |
| 19 | CHECK-NEXT: zed. |
Rafael Espindola | a2ed0b0 | 2015-07-08 20:47:32 +0000 | [diff] [blame] | 20 | |
| 21 | RUN: rm -f test-bsd.a |
| 22 | RUN: llvm-ar --format=bsd rc test-bsd.a 0123456789abcde 0123456789abcdef |
| 23 | RUN: cat test-bsd.a | FileCheck -strict-whitespace --check-prefix=BSD %s |
| 24 | |
| 25 | BSD: !<arch> |
| 26 | BSD-NEXT: #1/20 {{..............................}} 24 ` |
| 27 | BSD-NEXT: 0123456789abcde{{.....}}bar. |
| 28 | BSD-SAME: #1/16 {{..............................}} 20 ` |
| 29 | BSD-NEXT: 0123456789abcdefzed. |