blob: 51fa72a1f7b9d31de3c37a576f4e9d5357a604fe [file] [log] [blame]
Rafael Espindola0aac01b2013-07-13 04:14:13 +00001Test the exact archive format. In particular, test which file names use the
2string table or not.
3
Rafael Espindola0aac01b2013-07-13 04:14:13 +00004RUN: mkdir -p %t
5RUN: cd %t
6
NAKAMURA Takumi10d576d2015-03-03 15:54:48 +00007RUN: echo -n bar. > 0123456789abcde
8RUN: echo -n zed. > 0123456789abcdef
Rafael Espindola0aac01b2013-07-13 04:14:13 +00009
10RUN: rm -f test.a
Rafael Espindola2535ea02015-07-09 20:12:50 +000011RUN: llvm-ar --format=gnu rc test.a 0123456789abcde 0123456789abcdef
Rafael Espindola0aac01b2013-07-13 04:14:13 +000012RUN: cat test.a | FileCheck -strict-whitespace %s
13
14CHECK: !<arch>
15CHECK-NEXT: // 18 `
16CHECK-NEXT: 0123456789abcdef/
Benjamin Kramerc74fcc92013-07-13 15:21:39 +000017CHECK-NEXT: 0123456789abcde/{{................................}}4 `
NAKAMURA Takumi10d576d2015-03-03 15:54:48 +000018CHECK-NEXT: bar./0 {{................................}}4 `
19CHECK-NEXT: zed.
Rafael Espindolaa2ed0b02015-07-08 20:47:32 +000020
21RUN: rm -f test-bsd.a
22RUN: llvm-ar --format=bsd rc test-bsd.a 0123456789abcde 0123456789abcdef
23RUN: cat test-bsd.a | FileCheck -strict-whitespace --check-prefix=BSD %s
24
25BSD: !<arch>
26BSD-NEXT: #1/20 {{..............................}} 24 `
27BSD-NEXT: 0123456789abcde{{.....}}bar.
28BSD-SAME: #1/16 {{..............................}} 20 `
29BSD-NEXT: 0123456789abcdefzed.