2020-06-06 06:59:34 +08:00
|
|
|
# RUN: echo > %tempty.list
|
|
|
|
# RUN: not ld.lld --dynamic-list %tempty.list 2>&1 | FileCheck --check-prefix=EMPTY %s
|
|
|
|
# EMPTY: error: {{.*}}.list:1: unexpected EOF
|
|
|
|
|
2020-06-10 21:06:30 +08:00
|
|
|
# RUN: echo 'foobar' > %t1
|
2016-04-14 02:51:11 +08:00
|
|
|
# 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
|
|
|
|
2020-06-10 21:06:30 +08:00
|
|
|
# RUN: echo '{ foobar;' > %t2
|
|
|
|
# RUN: not ld.lld --dynamic-list %t2 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 '}'
|
2020-06-10 21:06:30 +08:00
|
|
|
# RUN: echo '{ foobar }' > %t3
|
|
|
|
# RUN: not ld.lld --dynamic-list %t3 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 ';'
|
2020-06-10 21:06:30 +08:00
|
|
|
# RUN: echo '{ foobar; }' > %t4
|
|
|
|
# RUN: not ld.lld --dynamic-list %t4 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
|
|
|
|
2020-06-10 21:06:30 +08:00
|
|
|
## Missing " in foobar definition
|
|
|
|
# RUN: echo '{ "foobar; };' > %t5
|
|
|
|
# RUN: not ld.lld --dynamic-list %t5 2>&1 | FileCheck -check-prefix=ERR5 %s
|
|
|
|
# ERR5: {{.*}}:1: unclosed quote
|
2016-04-14 02:51:11 +08:00
|
|
|
|
2020-06-10 21:06:30 +08:00
|
|
|
# RUN: echo '{ extern "BOGUS" { test }; };' > %t6
|
|
|
|
# RUN: not ld.lld --dynamic-list %t6 2>&1 | FileCheck -check-prefix=ERR6 %s
|
2016-12-09 01:54:26 +08:00
|
|
|
# ERR6: {{.*}}:1: Unknown language
|