[LLD][ELF] - Add a test case for parsing -defsym.
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 9 Aug 2018 10:40:11 +0000 (10:40 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 9 Aug 2018 10:40:11 +0000 (10:40 +0000)
This adds a coverage for the following line of the code:
https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L274

llvm-svn: 339326

lld/test/ELF/defsym.s

index 2abc08f..c819cd3 100644 (file)
 # EXPR-NEXT:   Section: Absolute
 # EXPR-NEXT: }
 
-# RUN: not ld.lld -o %t %t.o --defsym=foo2=und 2>&1 | FileCheck %s -check-prefix=ERR
-# ERR: error: -defsym:1: symbol not found: und
+# RUN: not ld.lld -o %t %t.o --defsym=foo2=und 2>&1 | FileCheck %s -check-prefix=ERR1
+# ERR1: error: -defsym:1: symbol not found: und
+
+# RUN: not ld.lld -o %t %t.o --defsym=xxx=yyy,zzz 2>&1 | FileCheck %s -check-prefix=ERR2
+# ERR2: -defsym:1: EOF expected, but got ,
 
 .globl foo1
  foo1 = 0x123