comparison lld/test/ELF/invalid-dynamic-list.test @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 1d019706d866
children
comparison
equal deleted inserted replaced
173:0572611fdcc8 207:2e18cbf3894f
1 ## Different "echo" commands on Windows interpret quoted strings and 1 # RUN: echo > %tempty.list
2 ## wildcards in similar but different way (On Windows, ARGV tokenization 2 # RUN: not ld.lld --dynamic-list %tempty.list 2>&1 | FileCheck --check-prefix=EMPTY %s
3 ## and wildcard expansion are not done by the shell but by each command.) 3 # EMPTY: error: {{.*}}.list:1: unexpected EOF
4 ## Because of that reason, this test fails on some Windows environment.
5 ## We can't write quoted strings that are interpreted the same way
6 ## by all echo commands. So, we don't want to run this on Windows.
7 4
8 # REQUIRES: shell 5 # RUN: echo 'foobar' > %t1
9
10 # RUN: mkdir -p %t.dir
11
12 # RUN: echo foobar > %t1
13 # RUN: not ld.lld --dynamic-list %t1 2>&1 | FileCheck -check-prefix=ERR1 %s 6 # RUN: not ld.lld --dynamic-list %t1 2>&1 | FileCheck -check-prefix=ERR1 %s
14 # ERR1: {{.*}}:1: { expected, but got foobar 7 # ERR1: {{.*}}:1: { expected, but got foobar
15 8
16 # RUN: echo "{ foobar;" > %t1 9 # RUN: echo '{ foobar;' > %t2
17 # RUN: not ld.lld --dynamic-list %t1 2>&1 | FileCheck -check-prefix=ERR2 %s 10 # RUN: not ld.lld --dynamic-list %t2 2>&1 | FileCheck -check-prefix=ERR2 %s
18 # ERR2: {{.*}}:1: unexpected EOF 11 # ERR2: {{.*}}:1: unexpected EOF
19 12
20 ## Missing ';' before '}' 13 ## Missing ';' before '}'
21 # RUN: echo "{ foobar }" > %t1 14 # RUN: echo '{ foobar }' > %t3
22 # RUN: not ld.lld --dynamic-list %t1 2>&1 | FileCheck -check-prefix=ERR3 %s 15 # RUN: not ld.lld --dynamic-list %t3 2>&1 | FileCheck -check-prefix=ERR3 %s
23 # ERR3: {{.*}}:1: ; expected, but got } 16 # ERR3: {{.*}}:1: ; expected, but got }
24 17
25 ## Missing final ';' 18 ## Missing final ';'
26 # RUN: echo "{ foobar; }" > %t1 19 # RUN: echo '{ foobar; }' > %t4
27 # RUN: not ld.lld --dynamic-list %t1 2>&1 | FileCheck -check-prefix=ERR4 %s 20 # RUN: not ld.lld --dynamic-list %t4 2>&1 | FileCheck -check-prefix=ERR4 %s
28 # ERR4: {{.*}}:1: unexpected EOF 21 # ERR4: {{.*}}:1: unexpected EOF
29 22
30 ## Missing \" in foobar definition 23 ## Missing " in foobar definition
31 # RUN echo "{ \"foobar; };" > %t1 24 # RUN: echo '{ "foobar; };' > %t5
32 # RUN: not ld.lld --dynamic-list %t1 2>&1 | FileCheck -check-prefix=ERR5 %s 25 # RUN: not ld.lld --dynamic-list %t5 2>&1 | FileCheck -check-prefix=ERR5 %s
33 # ERR5: {{.*}}:1: unexpected EOF 26 # ERR5: {{.*}}:1: unclosed quote
34 27
35 # RUN: echo "{ extern \"BOGUS\" { test }; };" > %t1 28 # RUN: echo '{ extern "BOGUS" { test }; };' > %t6
36 # RUN: not ld.lld --dynamic-list %t1 2>&1 | FileCheck -check-prefix=ERR6 %s 29 # RUN: not ld.lld --dynamic-list %t6 2>&1 | FileCheck -check-prefix=ERR6 %s
37 # ERR6: {{.*}}:1: Unknown language 30 # ERR6: {{.*}}:1: Unknown language