mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 21:30:01 -05:00
Tests: Simplify RunCMake.{if,while} unbalanced parenthesis cases
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
CMake Error at unbalanced-parenthesis\.cmake:[0-9]+ \(if\):
|
CMake Error at unbalanced-parenthesis\.cmake:[0-9]+ \(if\):
|
||||||
if given arguments:
|
if given arguments:
|
||||||
|
|
||||||
"NOT" "\(" "IN_LIST" "some_list"
|
"\("
|
||||||
|
|
||||||
mismatched parenthesis in condition
|
mismatched parenthesis in condition
|
||||||
Call Stack \(most recent call first\):
|
Call Stack \(most recent call first\):
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
set(var_with_paren "(")
|
set(paren "(")
|
||||||
set(some_list "")
|
if(${paren})
|
||||||
|
message(STATUS "Condition incorrectly true")
|
||||||
if(NOT ${var_with_paren} IN_LIST some_list)
|
|
||||||
message(STATUS "Never prints")
|
|
||||||
else()
|
|
||||||
message(STATUS "Never prints")
|
|
||||||
endif()
|
endif()
|
||||||
|
message(STATUS "Code incorrectly accepted")
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
CMake Error at unbalanced-parenthesis.cmake:[0-9]+ \(while\):
|
CMake Error at unbalanced-parenthesis.cmake:[0-9]+ \(while\):
|
||||||
had incorrect arguments:
|
had incorrect arguments:
|
||||||
|
|
||||||
"NOT" "\(" "IN_LIST" "some_list"
|
"\("
|
||||||
|
|
||||||
mismatched parenthesis in condition
|
mismatched parenthesis in condition
|
||||||
Call Stack \(most recent call first\):
|
Call Stack \(most recent call first\):
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
set(var_with_paren "(")
|
set(paren "(")
|
||||||
set(some_list "")
|
while(${paren})
|
||||||
|
message(STATUS "Condition incorrectly true")
|
||||||
while(NOT ${var_with_paren} IN_LIST some_list)
|
break()
|
||||||
message(STATUS "Never prints")
|
|
||||||
endwhile()
|
endwhile()
|
||||||
|
message(STATUS "Code incorrectly accepted")
|
||||||
message(STATUS "Never prints")
|
|
||||||
|
|||||||
Reference in New Issue
Block a user