File: file-name.test

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (41 lines) | stat: -rw-r--r-- 1,496 bytes parent folder | download | duplicates (19)
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
## 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