1## Different "echo" commands on Windows interpret quoted strings and
2## wildcards in similar but different way (On Windows, ARGV tokenization
3## and wildcard expansion are not done by the shell but by each command.)
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
8# REQUIRES: shell
9
10# RUN: mkdir -p %t.dir
11
12## Note that we are using "cannot open no-such-file: " as a marker that the
13## linker keep going when it found an error. That specific error message is not
14## related to the linker script tests.
15
16# RUN: echo foobar > %t1
17# RUN: not ld.lld %t1 no-such-file 2>&1 | FileCheck -check-prefix=ERR1 %s
18# ERR1: unexpected EOF
19# ERR1: cannot open no-such-file:
20
21# RUN: echo "foo \"bar" > %t2
22# RUN: not ld.lld %t2 no-such-file 2>&1 | FileCheck -check-prefix=ERR2 %s
23# ERR2: unclosed quote
24# ERR2: cannot open no-such-file:
25
26# RUN: echo "/*" > %t3
27# RUN: not ld.lld %t3 no-such-file 2>&1 | FileCheck -check-prefix=ERR3 %s
28# ERR3: unclosed comment
29# ERR3: cannot open no-such-file:
30
31# RUN: echo "EXTERN (" > %t4
32# RUN: not ld.lld %t4 no-such-file 2>&1 | FileCheck -check-prefix=ERR4 %s
33# ERR4: unexpected EOF
34# ERR4: cannot open no-such-file:
35
36# RUN: echo "EXTERN (" > %t5
37# RUN: not ld.lld %t5 no-such-file 2>&1 | FileCheck -check-prefix=ERR5 %s
38# ERR5: unexpected EOF
39# ERR5: cannot open no-such-file:
40
41# RUN: echo "EXTERN xyz" > %t6
42# RUN: not ld.lld %t6 no-such-file 2>&1 | FileCheck -check-prefix=ERR6 %s
43# ERR6: ( expected, but got xyz
44# ERR6: cannot open no-such-file:
45
46# RUN: echo "INCLUDE /no/such/file" > %t7
47# RUN: not ld.lld %t7 no-such-file 2>&1 | FileCheck -check-prefix=ERR7 %s
48# ERR7: cannot find linker script /no/such/file
49# ERR7: cannot open no-such-file:
50
51# RUN: echo "OUTPUT_FORMAT(x y z)" > %t8
52# RUN: not ld.lld %t8 no-such-file 2>&1 | FileCheck -check-prefix=ERR8 %s
53# ERR8: , expected, but got y
54# ERR8: cannot open no-such-file:
55