mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 02:39:48 -06: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\):
|
||||
if given arguments:
|
||||
|
||||
"NOT" "\(" "IN_LIST" "some_list"
|
||||
"\("
|
||||
|
||||
mismatched parenthesis in condition
|
||||
Call Stack \(most recent call first\):
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
set(var_with_paren "(")
|
||||
set(some_list "")
|
||||
|
||||
if(NOT ${var_with_paren} IN_LIST some_list)
|
||||
message(STATUS "Never prints")
|
||||
else()
|
||||
message(STATUS "Never prints")
|
||||
set(paren "(")
|
||||
if(${paren})
|
||||
message(STATUS "Condition incorrectly true")
|
||||
endif()
|
||||
message(STATUS "Code incorrectly accepted")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
CMake Error at unbalanced-parenthesis.cmake:[0-9]+ \(while\):
|
||||
had incorrect arguments:
|
||||
|
||||
"NOT" "\(" "IN_LIST" "some_list"
|
||||
"\("
|
||||
|
||||
mismatched parenthesis in condition
|
||||
Call Stack \(most recent call first\):
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
set(var_with_paren "(")
|
||||
set(some_list "")
|
||||
|
||||
while(NOT ${var_with_paren} IN_LIST some_list)
|
||||
message(STATUS "Never prints")
|
||||
set(paren "(")
|
||||
while(${paren})
|
||||
message(STATUS "Condition incorrectly true")
|
||||
break()
|
||||
endwhile()
|
||||
|
||||
message(STATUS "Never prints")
|
||||
message(STATUS "Code incorrectly accepted")
|
||||
|
||||
Reference in New Issue
Block a user