File: windres-format.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 (40 lines) | stat: -rw-r--r-- 1,761 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
; Check that the various input/output formats (rc/res/coff) are implied
; from file suffixes.

; RUN: rm -f %t.res
; RUN: llvm-windres --no-preprocess %p/Inputs/tag-stringtable-basic.rc %t.res
; RUN: llvm-readobj %t.res | FileCheck %s --check-prefix=CHECK-RES

; RUN: rm -f %t.o
; RUN: llvm-windres --no-preprocess -F pe-x86-64 %p/Inputs/tag-stringtable-basic.rc %t.o
; RUN: llvm-readobj --coff-resources %t.o | FileCheck %s --check-prefix=CHECK-OBJ

; RUN: rm -f %t.obj
; RUN: llvm-windres -F pe-x86-64 %t.res %t.obj
; RUN: llvm-readobj --coff-resources %t.obj | FileCheck %s --check-prefix=CHECK-OBJ

; Check that we can specify the input/output file types explicitly.
; Also check options for specifying the input/output file names.

; RUN: cat %p/Inputs/tag-stringtable-basic.rc > %t-anonymous
; RUN: rm -f %t-anonymous2
; RUN: llvm-windres --no-preprocess -O res -J rc -o %t-anonymous2 -i %t-anonymous
; RUN: llvm-readobj %t-anonymous2 | FileCheck %s --check-prefix=CHECK-RES

; RUN: rm -f %t-anonymous3
; RUN: llvm-windres -F pe-x86-64 -J res -O coff -i%t-anonymous2 -o%t-anonymous3
; RUN: llvm-readobj --coff-resources %t-anonymous3 | FileCheck %s --check-prefix=CHECK-OBJ

; CHECK-RES: Resource type (int): STRINGTABLE

; CHECK-OBJ: Format: COFF-x86-64
; CHECK-OBJ: Resources [
; CHECK-OBJ:   Total Number of Resources:

; Check for format conversions that currently aren't supported.

; RUN: not llvm-windres -F pe-x86-64 -J res -O rc -i%t-anonymous2 -o%t-anonymous 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR-OUTPUT
; RUN: not llvm-windres -F pe-x86-64 -J coff -O res -i%t-anonymous3 -o%t-anonymous2 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR-INPUT

; CHECK-ERROR-OUTPUT: Unsupported output format
; CHECK-ERROR-INPUT: Unsupported input format