1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/tools/llvm-ar/response.test
Abhina Sreeskantharajan 8fb00b74f1 [test] Use host platform specific error message substitution in lit tests
On z/OS, the following error message is not matched correctly in lit tests.

```
EDC5129I No such file or directory.
```

This patch uses a lit config substitution to check for platform specific error messages.

Reviewed By: muiez, jhenderson

Differential Revision: https://reviews.llvm.org/D95246
2021-01-29 07:16:30 -05:00

42 lines
1.5 KiB
Plaintext

## 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 -DMSG=%errc_ENOENT %s --check-prefix=WIN
# WIN: error: blah\foo: [[MSG]]
# RUN: not llvm-ar -rsp-quoting posix @%t-rsp.txt 2>&1 | \
# RUN: FileCheck -DMSG=%errc_ENOENT %s --check-prefix=POSIX
# POSIX: error: blahfoo: [[MSG]]