File: invalid-dynamic-list.test

package info (click to toggle)
llvm-toolchain-9 1%3A9.0.1-16
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 882,436 kB
  • sloc: cpp: 4,167,636; ansic: 714,256; asm: 457,610; python: 155,927; objc: 65,094; sh: 42,856; lisp: 26,908; perl: 7,786; pascal: 7,722; makefile: 6,881; ml: 5,581; awk: 3,648; cs: 2,027; xml: 888; javascript: 381; ruby: 156
file content (37 lines) | stat: -rw-r--r-- 1,432 bytes parent folder | download | duplicates (7)
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
## Different "echo" commands on Windows interpret quoted strings and
## wildcards in similar but different way (On Windows, ARGV tokenization
## and wildcard expansion are not done by the shell but by each command.)
## Because of that reason, this test fails on some Windows environment.
## We can't write quoted strings that are interpreted the same way
## by all echo commands. So, we don't want to run this on Windows.

# REQUIRES: shell

# RUN: mkdir -p %t.dir

# RUN: echo foobar > %t1
# RUN: not ld.lld --dynamic-list %t1 2>&1 | FileCheck -check-prefix=ERR1 %s
# ERR1: {{.*}}:1: { expected, but got foobar

# RUN: echo "{ foobar;" > %t1
# RUN: not ld.lld --dynamic-list %t1 2>&1 | FileCheck -check-prefix=ERR2 %s
# ERR2: {{.*}}:1: unexpected EOF

## Missing ';' before '}'
# RUN: echo "{ foobar }" > %t1
# RUN: not ld.lld --dynamic-list %t1 2>&1 | FileCheck -check-prefix=ERR3 %s
# ERR3: {{.*}}:1: ; expected, but got }

## Missing final ';'
# RUN: echo "{ foobar; }" > %t1
# RUN: not ld.lld --dynamic-list %t1 2>&1 | FileCheck -check-prefix=ERR4 %s
# ERR4: {{.*}}:1: unexpected EOF

## Missing \" in foobar definition
# RUN echo "{ \"foobar; };" > %t1
# RUN: not ld.lld --dynamic-list %t1 2>&1 | FileCheck -check-prefix=ERR5 %s
# ERR5: {{.*}}:1: unexpected EOF

# RUN: echo "{ extern \"BOGUS\" { test }; };" > %t1
# RUN: not ld.lld --dynamic-list %t1 2>&1 | FileCheck -check-prefix=ERR6 %s
# ERR6: {{.*}}:1: Unknown language