mirror of
https://github.com/reactos/CMake.git
synced 2024-11-25 04:29:52 +00:00
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
1
Tests/RunCMake/Syntax/.gitattributes
vendored
Normal file
1
Tests/RunCMake/Syntax/.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
||||
CommandTabs.cmake whitespace=-tab-in-indent
|
4
Tests/RunCMake/Syntax/CommandComments-stderr.txt
Normal file
4
Tests/RunCMake/Syntax/CommandComments-stderr.txt
Normal file
@ -0,0 +1,4 @@
|
||||
Example Message
|
||||
Example Message
|
||||
Example Message
|
||||
Second Line of Example
|
6
Tests/RunCMake/Syntax/CommandComments.cmake
Normal file
6
Tests/RunCMake/Syntax/CommandComments.cmake
Normal file
@ -0,0 +1,6 @@
|
||||
message("Example Message"#)
|
||||
)
|
||||
message ("Example Message" # )
|
||||
)
|
||||
message( "Example Message\n" # "Commented" )
|
||||
"Second Line of Example")
|
1
Tests/RunCMake/Syntax/CommandError0-result.txt
Normal file
1
Tests/RunCMake/Syntax/CommandError0-result.txt
Normal file
@ -0,0 +1 @@
|
||||
1
|
8
Tests/RunCMake/Syntax/CommandError0-stderr.txt
Normal file
8
Tests/RunCMake/Syntax/CommandError0-stderr.txt
Normal file
@ -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
|
2
Tests/RunCMake/Syntax/CommandError0.cmake
Normal file
2
Tests/RunCMake/Syntax/CommandError0.cmake
Normal file
@ -0,0 +1,2 @@
|
||||
message
|
||||
("Example Message")
|
1
Tests/RunCMake/Syntax/CommandError1-result.txt
Normal file
1
Tests/RunCMake/Syntax/CommandError1-result.txt
Normal file
@ -0,0 +1 @@
|
||||
1
|
7
Tests/RunCMake/Syntax/CommandError1-stderr.txt
Normal file
7
Tests/RunCMake/Syntax/CommandError1-stderr.txt
Normal file
@ -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
|
1
Tests/RunCMake/Syntax/CommandError1.cmake
Normal file
1
Tests/RunCMake/Syntax/CommandError1.cmake
Normal file
@ -0,0 +1 @@
|
||||
message("Example Message") message("Second Message")
|
3
Tests/RunCMake/Syntax/CommandNewlines-stderr.txt
Normal file
3
Tests/RunCMake/Syntax/CommandNewlines-stderr.txt
Normal file
@ -0,0 +1,3 @@
|
||||
Example Message
|
||||
Example Message
|
||||
Example Message
|
10
Tests/RunCMake/Syntax/CommandNewlines.cmake
Normal file
10
Tests/RunCMake/Syntax/CommandNewlines.cmake
Normal file
@ -0,0 +1,10 @@
|
||||
message(
|
||||
"Example Message")
|
||||
message (
|
||||
"Example Message"
|
||||
)
|
||||
message(
|
||||
|
||||
"Example Message"
|
||||
|
||||
)
|
6
Tests/RunCMake/Syntax/CommandSpaces-stderr.txt
Normal file
6
Tests/RunCMake/Syntax/CommandSpaces-stderr.txt
Normal file
@ -0,0 +1,6 @@
|
||||
Example Message
|
||||
Example Message
|
||||
Example Message
|
||||
Example Message
|
||||
Example Message
|
||||
Example Message
|
6
Tests/RunCMake/Syntax/CommandSpaces.cmake
Normal file
6
Tests/RunCMake/Syntax/CommandSpaces.cmake
Normal file
@ -0,0 +1,6 @@
|
||||
message("Example Message")
|
||||
message ("Example Message")
|
||||
message( "Example Message" )
|
||||
message( "Example Message")
|
||||
message ( "Example Message")
|
||||
message ( Example " " Message )
|
6
Tests/RunCMake/Syntax/CommandTabs-stderr.txt
Normal file
6
Tests/RunCMake/Syntax/CommandTabs-stderr.txt
Normal file
@ -0,0 +1,6 @@
|
||||
Example Message
|
||||
Example Message
|
||||
Example Message
|
||||
Example Message
|
||||
Example Message
|
||||
Example Message
|
6
Tests/RunCMake/Syntax/CommandTabs.cmake
Normal file
6
Tests/RunCMake/Syntax/CommandTabs.cmake
Normal file
@ -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
Block a user