mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Tests: Fix symbolic component tests
The tests added in commit d92b6c3e20 (CPS: Add Symbolic Components,
2025-09-01, v4.2.0-rc1~48^2~1) had an inverted conditional, such that
they passed if the output did NOT match what was expected. The expected
expressions were also improperly escaped, which "canceled" this error,
allowing the tests to erroneously pass. Fix both of these errors.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
file(READ "${RunCMake_TEST_BINARY_DIR}/foo.cmake" foo)
|
||||
if("${foo}" MATCHES "add_library\(foo INTERFACE SYMBOLIC IMPORTED\)")
|
||||
string(APPEND RunCMake_TEST_FAILED "Symbolic Component Foo was not exported\n")
|
||||
if(NOT "${foo}" MATCHES "add_library\\(foo INTERFACE SYMBOLIC IMPORTED\\)")
|
||||
string(APPEND RunCMake_TEST_FAILED "Interface library 'foo' Component Foo was not exported\n")
|
||||
endif()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
file(READ "${RunCMake_TEST_BINARY_DIR}/root-all/foo.cmake" foo)
|
||||
|
||||
if("${foo}" MATCHES "add_library\(foo INTERFACE SYMBOLIC IMPORTED\)")
|
||||
if(NOT "${foo}" MATCHES "add_library\\(foo INTERFACE SYMBOLIC IMPORTED\\)")
|
||||
string(APPEND RunCMake_TEST_FAILED "Symbolic Component Foo was not exported\n")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user