File: file-name.test

package info (click to toggle)
llvm-toolchain-11 1%3A11.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 995,808 kB
  • sloc: cpp: 4,767,656; ansic: 760,916; asm: 477,436; python: 170,940; objc: 69,804; lisp: 29,914; sh: 23,855; f90: 18,173; pascal: 7,551; perl: 7,471; ml: 5,603; awk: 3,489; makefile: 2,573; xml: 915; cs: 573; fortran: 503; javascript: 452
file content (42 lines) | stat: -rw-r--r-- 1,527 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
## This test shows that the name of the file is printed under the right
## circumstances and with the correct formatting for object inputs.

# RUN: yaml2obj %s -o %t1
# RUN: cp %t1 %t2

## Show that the file name is not printed for a single input for GNU output.
# RUN: llvm-readelf --file-headers %t1 \
# RUN:   | FileCheck %s --implicit-check-not=File: --check-prefix=GNU-SINGLE

## Show that the very first line of the output is the one with "ELF Header" on.
# GNU-SINGLE:      {{^}}
# GNU-SINGLE-SAME: ELF Header:

## Show that the file names are printed for all inputs for GNU output.
# RUN: llvm-readelf --file-headers %t1 %t2 \
# RUN:   | FileCheck %s --check-prefixes=NAME1,GNU,NAME2 -DFILE1=%t1 -DFILE2=%t2

## Show that the file name is printed for a single input for LLVM output.
# RUN: llvm-readobj --file-headers %t1 | FileCheck %s --check-prefix=NAME1 -DFILE1=%t1

## Show that the file name is printed with correct spacing for multiple inputs
## with LLVM output.
# RUN: llvm-readobj --file-headers %t1 %t2 \
# RUN:   | FileCheck %s --check-prefixes=NAME1,LLVM,NAME2 -DFILE1=%t1 -DFILE2=%t2

## The very first line should be blank. CHECK-EMPTY isn't allowed on the first line.
# NAME1:      {{^$}}
# NAME1-NEXT: {{^}}File: [[FILE1]]{{$}}

# GNU:          Section header string table index:
# LLVM:         StringTableSectionIndex:
# LLVM-NEXT:  }
# NAME2-EMPTY:
# NAME2-NEXT: {{^}}File: [[FILE2]]{{$}}

--- !ELF
FileHeader:
  Class:    ELFCLASS64
  Data:     ELFDATA2LSB
  Type:     ET_REL
  Machine:  EM_X86_64