4 # RUN: cp %p/Inputs/trivial.obj.elf-x86-64 a/b/1.o
5 # The archive is deliberately in a different directory to the cwd, to show that
6 # the member paths printed are exactly what's in the archive and not relative
8 # RUN: llvm-ar rcT a/relative.a a/b/1.o
10 # Show that relative paths in the file header printing look sensible.
11 # RUN: llvm-readobj --file-headers a/relative.a | FileCheck %s -DARFILE="a/relative.a" --check-prefix=REL
12 # REL: File: [[ARFILE]](b/1.o)
14 # Show that relative paths in an error message for both archive and member look
17 # RUN: not llvm-readobj --file-headers a/relative.a 2>&1 | FileCheck %s --check-prefix=ERR1
18 # RUN: not llvm-readelf --file-headers a/relative.a 2>&1 | FileCheck %s --check-prefix=ERR1
19 # ERR1: error: 'a/relative.a': 'b/1.o': {{[Nn]}}o such file or directory
22 # RUN: cp %p/Inputs/trivial.obj.elf-x86-64 a/b/1.o
23 # RUN: llvm-ar rcT c/absolute.a %t/a/b/1.o
25 # Show that absolute paths in the file header printing are correct.
26 # RUN: llvm-readobj --file-headers c/absolute.a | FileCheck %s --check-prefix=ABS -DARFILE="c/absolute.a" -DDIR=%/t
27 # ABS: File: [[ARFILE]]([[DIR]]/a/b/1.o)
29 # Show that absolute paths in an error message for both archive and member are correct.
31 # RUN: not llvm-readobj --file-headers %/t/c/absolute.a 2>&1 | FileCheck %s --check-prefix=ERR2 -DDIR=%/t
32 # RUN: not llvm-readelf --file-headers %/t/c/absolute.a 2>&1 | FileCheck %s --check-prefix=ERR2 -DDIR=%/t
33 # ERR2: error: '[[DIR]]/c/absolute.a': '[[DIR]]/a/b/1.o': {{[Nn]}}o such file or directory