File: response.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 (41 lines) | stat: -rw-r--r-- 1,535 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
## llvm-ar should be able to consume response files.

# RUN: echo 'contents' > %t.txt
# RUN: echo 'rc %t1.a %t.txt' > %t.response1.txt
# RUN: llvm-ar @%t.response1.txt
# RUN: llvm-ar p %t1.a | FileCheck %s --check-prefix=CONTENTS

## Quotes and Spaces.
# RUN: echo 'contents' > '%t space.txt'
## Python is used here to ensure the quotes are written to the response file
# RUN: %python -c "import os; open(r'%t.response2.txt', 'w').write(r'%t2.a \"%t space.txt\"'+ '\n')"
# RUN: llvm-ar rc @%t.response2.txt
# RUN: llvm-ar p %t2.a | FileCheck %s --check-prefix=CONTENTS

## Arguments after the response file.
# RUN: echo 'rc %t3.a' > %t.response3.txt
# RUN: llvm-ar @%t.response3.txt %t.txt
# RUN: llvm-ar p %t3.a | FileCheck %s --check-prefix=CONTENTS

## Newlines
# RUN: echo contents > %t.txt
# RUN: echo rc %t4.a > %t.newline.txt
# RUN: echo %t.txt >> %t.newline.txt
# RUN: llvm-ar @%t.newline.txt
# RUN: llvm-ar p %t4.a | FileCheck %s --check-prefix=CONTENTS

# CONTENTS: contents

## rsp-quoting
# RUN: not llvm-ar --rsp-quoting=foobar @%t.response1.txt 2>&1 | \
# RUN:   FileCheck  %s --check-prefix=ERROR
# ERROR: Invalid response file quoting style foobar

# RUN: echo -e 'rc %/t.a blah\\foo' > %t-rsp.txt
# RUN: not llvm-ar --rsp-quoting=windows @%t-rsp.txt 2>&1 | \
# RUN:   FileCheck %s --check-prefix=WIN
# WIN: error: blah\foo: {{[Nn]}}o such file or directory

# RUN: not llvm-ar -rsp-quoting posix @%t-rsp.txt 2>&1 | \
# RUN:   FileCheck %s --check-prefix=POSIX
# POSIX: error: blahfoo: {{[Nn]}}o such file or directory