[lld] r284846 - Use FileCheck's -strict-whitespace option instead of sed.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 21 10:50:27 PDT 2016


Author: ruiu
Date: Fri Oct 21 12:50:26 2016
New Revision: 284846

URL: http://llvm.org/viewvc/llvm-project?rev=284846&view=rev
Log:
Use FileCheck's -strict-whitespace option instead of sed.

Modified:
    lld/trunk/test/ELF/linkerscript/diagnostic.s

Modified: lld/trunk/test/ELF/linkerscript/diagnostic.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/linkerscript/diagnostic.s?rev=284846&r1=284845&r2=284846&view=diff
==============================================================================
--- lld/trunk/test/ELF/linkerscript/diagnostic.s (original)
+++ lld/trunk/test/ELF/linkerscript/diagnostic.s Fri Oct 21 12:50:26 2016
@@ -44,16 +44,15 @@
 # ERR5: line 6:
 
 ## Check that text of lines and pointer to 'bad' token are working ok.
-## Because FileCheck ignores whitespace differences, we replace ' ' with '.'.
 # RUN: echo "UNKNOWN_TAG {" > %t.script
 # RUN: echo ".text : { *(.text) }" >> %t.script
 # RUN: echo ".keep : { *(.keep) }" >> %t.script
 # RUN: echo ".temp : { *(.temp) } }" >> %t.script
 # RUN: not ld.lld -shared %t -o %t1 --script %t.script 2>&1 | \
-# RUN:   sed 's/ /_/g' | FileCheck -check-prefix=ERR6 %s
-# ERR6:      error:_line_1:
-# ERR6-NEXT: error:_UNKNOWN_TAG_{
-# ERR6-NEXT: error:_^
+# RUN:   FileCheck -check-prefix=ERR6 -strict-whitespace %s
+# ERR6:      error: line 1:
+# ERR6-NEXT: error: UNKNOWN_TAG {
+# ERR6-NEXT: error: ^
 
 ## One more check that text of lines and pointer to 'bad' token are working ok.
 # RUN: echo "SECTIONS {" > %t.script
@@ -61,7 +60,7 @@
 # RUN: echo ".keep : { *(.keep) }" >> %t.script
 # RUN: echo "boom .temp : { *(.temp) } }" >> %t.script
 # RUN: not ld.lld -shared %t -o %t1 --script %t.script 2>&1 | \
-# RUN:   sed 's/ /_/g' | FileCheck -check-prefix=ERR7 %s
-# ERR7:      error:_line_4:_malformed_number:_.temp
-# ERR7-NEXT: error:_boom_.temp_:_{_*(.temp)_}_}
-# ERR7-NEXT: error:______^
+# RUN:   FileCheck -check-prefix=ERR7 -strict-whitespace %s
+# ERR7:      error: line 4: malformed number: .temp
+# ERR7-NEXT: error: boom .temp : { *(.temp) } }
+# ERR7-NEXT: error:      ^




More information about the llvm-commits mailing list