2016-04-14 02:51:11 +08:00
|
|
|
## 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
|
2016-11-21 23:49:56 +08:00
|
|
|
# ERR1: {{.*}}:1: { expected, but got foobar
|
2016-04-14 02:51:11 +08:00
|
|
|
|
|
|
|
# RUN: echo "{ foobar;" > %t1
|
|
|
|
# RUN: not ld.lld --dynamic-list %t1 2>&1 | FileCheck -check-prefix=ERR2 %s
|
2016-11-21 23:49:56 +08:00
|
|
|
# ERR2: {{.*}}:1: unexpected EOF
|
2016-04-14 02:51:11 +08:00
|
|
|
|
|
|
|
## Missing ';' before '}'
|
|
|
|
# RUN: echo "{ foobar }" > %t1
|
|
|
|
# RUN: not ld.lld --dynamic-list %t1 2>&1 | FileCheck -check-prefix=ERR3 %s
|
2016-11-21 23:49:56 +08:00
|
|
|
# ERR3: {{.*}}:1: ; expected, but got }
|
2016-04-14 02:51:11 +08:00
|
|
|
|
|
|
|
## Missing final ';'
|
|
|
|
# RUN: echo "{ foobar; }" > %t1
|
|
|
|
# RUN: not ld.lld --dynamic-list %t1 2>&1 | FileCheck -check-prefix=ERR4 %s
|
2016-11-21 23:49:56 +08:00
|
|
|
# ERR4: {{.*}}:1: unexpected EOF
|
2016-04-14 02:51:11 +08:00
|
|
|
|
|
|
|
## Missing \" in foobar definition
|
|
|
|
# RUN echo "{ \"foobar; };" > %t1
|
|
|
|
# RUN: not ld.lld --dynamic-list %t1 2>&1 | FileCheck -check-prefix=ERR5 %s
|
2016-11-21 23:49:56 +08:00
|
|
|
# ERR5: {{.*}}:1: unexpected EOF
|
2016-04-14 02:51:11 +08:00
|
|
|
|
|
|
|
# RUN: echo "{ extern \"BOGUS\" { test }; };" > %t1
|
|
|
|
# RUN: not ld.lld --dynamic-list %t1 2>&1 | FileCheck -check-prefix=ERR6 %s
|
2016-12-09 01:54:26 +08:00
|
|
|
# ERR6: {{.*}}:1: Unknown language
|