Rui Ueyama | 025d59b | 2016-02-02 20:27:59 +0000 | [diff] [blame^] | 1 | # RUN: mkdir -p %t.dir |
| 2 | |
| 3 | ## Note that we will see "no input files" error message after |
| 4 | ## error messages from the linker script parser, because the |
| 5 | ## linker keeps going when an error is found. |
| 6 | |
| 7 | # RUN: echo foobar > %t1 |
| 8 | # RUN: not ld.lld %t1 2>&1 | FileCheck -check-prefix=ERR1 %s |
| 9 | # ERR1: unknown directive: foobar |
| 10 | # ERR1: no input files |
| 11 | |
| 12 | # RUN: echo "foo \"bar" > %t2 |
| 13 | # RUN: not ld.lld %t2 2>&1 | FileCheck -check-prefix=ERR2 %s |
| 14 | # ERR2: unclosed quote |
| 15 | # ERR2: no input files |
| 16 | |
| 17 | # RUN: echo "/*" > %t3 |
| 18 | # RUN: not ld.lld %t3 2>&1 | FileCheck -check-prefix=ERR3 %s |
| 19 | # ERR3: unclosed comment |
| 20 | # ERR3: no input files |
| 21 | |
| 22 | # RUN: echo "EXTERN (" > %t4 |
| 23 | # RUN: not ld.lld %t4 2>&1 | FileCheck -check-prefix=ERR4 %s |
| 24 | # ERR4: unexpected EOF |
| 25 | # ERR4: no input files |
| 26 | |
| 27 | # RUN: echo "EXTERN (" > %t5 |
| 28 | # RUN: not ld.lld %t5 2>&1 | FileCheck -check-prefix=ERR5 %s |
| 29 | # ERR5: unexpected EOF |
| 30 | # ERR5: no input files |
| 31 | |
| 32 | # RUN: echo "EXTERN xyz" > %t6 |
| 33 | # RUN: not ld.lld %t6 2>&1 | FileCheck -check-prefix=ERR6 %s |
| 34 | # ERR6: ( expected, but got xyz |
| 35 | # ERR6: no input files |
| 36 | |
| 37 | # RUN: echo "INCLUDE /no/such/file" > %t7 |
| 38 | # RUN: not ld.lld %t7 2>&1 | FileCheck -check-prefix=ERR7 %s |
| 39 | # ERR7: cannot open /no/such/file |
| 40 | # ERR7: no input files |
| 41 | |
| 42 | # RUN: echo "OUTPUT_FORMAT(x y z)" > %t8 |
| 43 | # RUN: not ld.lld %t8 2>&1 | FileCheck -check-prefix=ERR8 %s |
| 44 | # ERR8: unexpected token: y |
| 45 | # ERR8: no input files |