Add RunCMake.Syntax test cases for command invocation styles
Cover commands with whitespace present in allowed combinations. Also cover command error cases such as two on one line.
This commit is contained in:
parent
0546484e4b
commit
e945949d14
|
@ -0,0 +1 @@
|
|||
CommandTabs.cmake whitespace=-tab-in-indent
|
|
@ -0,0 +1,4 @@
|
|||
Example Message
|
||||
Example Message
|
||||
Example Message
|
||||
Second Line of Example
|
|
@ -0,0 +1,6 @@
|
|||
message("Example Message"#)
|
||||
)
|
||||
message ("Example Message" # )
|
||||
)
|
||||
message( "Example Message\n" # "Commented" )
|
||||
"Second Line of Example")
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -0,0 +1,8 @@
|
|||
CMake Error: Error in cmake code at
|
||||
.*/Tests/RunCMake/Syntax/CommandError0.cmake:2:
|
||||
Parse error. Expected "\(", got newline with text "
|
||||
".
|
||||
CMake Error at CMakeLists.txt:3 \(include\):
|
||||
include could not find load file:
|
||||
|
||||
CommandError0.cmake
|
|
@ -0,0 +1,2 @@
|
|||
message
|
||||
("Example Message")
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -0,0 +1,7 @@
|
|||
CMake Error: Error in cmake code at
|
||||
.*/Tests/RunCMake/Syntax/CommandError1.cmake:1:
|
||||
Parse error. Expected a newline, got identifier with text "message".
|
||||
CMake Error at CMakeLists.txt:3 \(include\):
|
||||
include could not find load file:
|
||||
|
||||
CommandError1.cmake
|
|
@ -0,0 +1 @@
|
|||
message("Example Message") message("Second Message")
|
|
@ -0,0 +1,3 @@
|
|||
Example Message
|
||||
Example Message
|
||||
Example Message
|
|
@ -0,0 +1,10 @@
|
|||
message(
|
||||
"Example Message")
|
||||
message (
|
||||
"Example Message"
|
||||
)
|
||||
message(
|
||||
|
||||
"Example Message"
|
||||
|
||||
)
|
|
@ -0,0 +1,6 @@
|
|||
Example Message
|
||||
Example Message
|
||||
Example Message
|
||||
Example Message
|
||||
Example Message
|
||||
Example Message
|
|
@ -0,0 +1,6 @@
|
|||
message("Example Message")
|
||||
message ("Example Message")
|
||||
message( "Example Message" )
|
||||
message( "Example Message")
|
||||
message ( "Example Message")
|
||||
message ( Example " " Message )
|
|
@ -0,0 +1,6 @@
|
|||
Example Message
|
||||
Example Message
|
||||
Example Message
|
||||
Example Message
|
||||
Example Message
|
||||
Example Message
|
|
@ -0,0 +1,6 @@
|
|||
message("Example Message")
|
||||
message ("Example Message")
|
||||
message( "Example Message" )
|
||||
message( "Example Message")
|
||||
message ( "Example Message")
|
||||
message ( Example " " Message )
|
|
@ -1,5 +1,11 @@
|
|||
include(RunCMake)
|
||||
|
||||
run_cmake(CommandSpaces)
|
||||
run_cmake(CommandTabs)
|
||||
run_cmake(CommandNewlines)
|
||||
run_cmake(CommandComments)
|
||||
run_cmake(CommandError0)
|
||||
run_cmake(CommandError1)
|
||||
run_cmake(String0)
|
||||
run_cmake(String1)
|
||||
run_cmake(StringNoSpace)
|
||||
|
|
Loading…
Reference in New Issue