2
0

archive-format.test 1000 B

1234567891011121314151617181920212223242526272829
  1. Test the exact archive format. In particular, test which file names use the
  2. string table or not.
  3. RUN: mkdir -p %t
  4. RUN: cd %t
  5. RUN: echo -n bar. > 0123456789abcde
  6. RUN: echo -n zed. > 0123456789abcdef
  7. RUN: rm -f %t.a
  8. RUN: llvm-ar --format=gnu rc %t.a 0123456789abcde 0123456789abcdef
  9. RUN: cat %t.a | FileCheck -strict-whitespace %s
  10. CHECK: !<arch>
  11. CHECK-NEXT: // 18 `
  12. CHECK-NEXT: 0123456789abcdef/
  13. CHECK-NEXT: 0123456789abcde/0 0 0 644 4 `
  14. CHECK-NEXT: bar./0 0 0 0 644 4 `
  15. CHECK-NEXT: zed.
  16. RUN: rm -f %t.a
  17. RUN: llvm-ar --format=bsd rc %t.a 0123456789abcde 0123456789abcdef
  18. RUN: cat %t.a | FileCheck -strict-whitespace --check-prefix=BSD %s
  19. BSD: !<arch>
  20. BSD-NEXT: #1/20 0 0 0 644 24 `
  21. BSD-NEXT: 0123456789abcde{{.....}}bar.
  22. BSD-SAME: #1/16 0 0 0 644 20 `
  23. BSD-NEXT: 0123456789abcdefzed.