[llvm-branch-commits] [flang] [libc] [clang-tools-extra] [compiler-rt] [clang] [llvm] [OptTable] Make new lines in help text respect indentation (PR #74880)

Andres Villegas via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Dec 12 10:26:37 PST 2023


================
@@ -1,16 +1,16 @@
 ; RUN: llvm-cvtres /h > %t
-; RUN: FileCheck -input-file=%t %s -check-prefix=HELP_TEST
+; RUN: FileCheck -input-file=%t %s --strict-whitespace -check-prefix=HELP_TEST
 
-; HELP_TEST: 	  OVERVIEW: Resource Converter
-; HELP_TEST-DAG:  USAGE: llvm-cvtres [options] file...
-; HELP_TEST-DAG:  OPTIONS:
-; HELP_TEST-NEXT:   /{{DEFINE}}:symbol - Not implemented
-; HELP_TEST-NEXT:   /FOLDDUPS: - Not implemented
-; HELP_TEST-NEXT:   /HELP - Display available options
+;      HELP_TEST: OVERVIEW: Resource Converter
+;  HELP_TEST-DAG: USAGE: llvm-cvtres [options] file...
+;  HELP_TEST-DAG: OPTIONS:
+; HELP_TEST-NEXT:   /{{DEFINE}}:symbol     - Not implemented
----------------
avillega wrote:

This is a quirk of FileCheck. It thinks that `DEFINE` is a directive, so in order to match the `DEFINE` word it is necessary to make it a regex. FileCheck will ignore `{{}}` and that is why it doesn't look at the same indentation level as the rest of the options, but it is. 

https://github.com/llvm/llvm-project/pull/74880


More information about the llvm-branch-commits mailing list