File: invalid.test

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.8-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,388 kB
  • sloc: cpp: 7,438,767; ansic: 1,393,871; asm: 1,012,926; python: 241,728; f90: 86,635; objc: 75,411; lisp: 42,144; pascal: 17,286; sh: 10,027; ml: 5,082; perl: 4,730; awk: 3,523; makefile: 3,349; javascript: 2,251; xml: 892; fortran: 672
file content (64 lines) | stat: -rw-r--r-- 2,474 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
## 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

## Note that we are using "cannot open no-such-file: " as a marker that the
## linker keep going when it found an error. That specific error message is not
## related to the linker script tests.

# RUN: echo foobar > %t1
# RUN: not ld.lld %t1 no-such-file 2>&1 | FileCheck -check-prefix=ERR1 %s
# ERR1: error: {{.*}}1:1: unknown directive: foobar
# ERR1: cannot open no-such-file:

# RUN: echo "foo \"bar" > %t2
# RUN: not ld.lld %t2 no-such-file 2>&1 | FileCheck -check-prefix=ERR2 %s
# ERR2: unclosed quote
# ERR2: cannot open no-such-file:

# RUN: echo "/*" > %t3
# RUN: not ld.lld %t3 no-such-file 2>&1 | FileCheck -check-prefix=ERR3 %s
# ERR3: unclosed comment
# ERR3: cannot open no-such-file:

# RUN: echo "EXTERN (" > %t4
# RUN: not ld.lld %t4 no-such-file 2>&1 | FileCheck -check-prefix=ERR4 %s
# ERR4: unexpected EOF
# ERR4: cannot open no-such-file:

# RUN: echo "EXTERN (" > %t5
# RUN: not ld.lld %t5 no-such-file 2>&1 | FileCheck -check-prefix=ERR5 %s
# ERR5: unexpected EOF
# ERR5: cannot open no-such-file:

# RUN: echo "EXTERN xyz" > %t6
# RUN: not ld.lld %t6 no-such-file 2>&1 | FileCheck -check-prefix=ERR6 %s
# ERR6: ( expected, but got xyz
# ERR6: cannot open no-such-file:

# RUN: echo "INCLUDE /no/such/file" > %t7
# RUN: not ld.lld %t7 no-such-file 2>&1 | FileCheck -check-prefix=ERR7 %s
# ERR7: cannot find linker script /no/such/file
# ERR7: cannot open no-such-file:

# RUN: echo "OUTPUT_FORMAT(x y z)" > %t8
# RUN: not ld.lld %t8 no-such-file 2>&1 | FileCheck -check-prefix=ERR8 %s
# RUN: not ld.lld -m elf_amd64 %t8 no-such-file 2>&1 | FileCheck -check-prefix=ERR8 %s
# ERR8: , expected, but got y
# ERR8: cannot open no-such-file:

# RUN: echo "OUTPUT_FORMAT(elf64-x86-64 y z)" > %t9
# RUN: not ld.lld %t9 no-such-file 2>&1 | FileCheck -check-prefix=ERR9 %s
# ERR9: , expected, but got y
# ERR9: cannot open no-such-file:

# RUN: echo 'OUTPUT_FORMAT("")' > %t10
# RUN: not ld.lld %t10 2>&1 | FileCheck -check-prefix=ERR10 %s
# ERR10: error: {{.*}}:1: unknown output format name: