summaryrefslogtreecommitdiff
path: root/test/LinkerScript/missing-operand.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/LinkerScript/missing-operand.test')
-rw-r--r--test/LinkerScript/missing-operand.test24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/LinkerScript/missing-operand.test b/test/LinkerScript/missing-operand.test
new file mode 100644
index 000000000000..cfa87bf40768
--- /dev/null
+++ b/test/LinkerScript/missing-operand.test
@@ -0,0 +1,24 @@
+/*
+ RUN: linker-script-test %s 2> %t | FileCheck %s
+ RUN: FileCheck -check-prefix=CHECK-ERR -input-file %t %s
+*/
+SECTIONS {
+ . = foo / ;
+/*
+CHECK-ERR: [[@LINE-2]]:15: error: expected symbol, number, minus, tilde or left parenthesis.
+CHECK-ERR-NEXT: {{^ . = foo / ;}}
+CHECK-ERR-NEXT: {{^ \^}}
+*/
+}
+
+/*
+CHECK: kw_sections: SECTIONS
+CHECK: l_brace: {
+CHECK: identifier: .
+CHECK: equal: =
+CHECK: identifier: foo
+CHECK: slash: /
+CHECK: semicolon: ;
+CHECK: r_brace: }
+CHECK: eof:
+ */