CMake/Tests/RunCMake/add_test/CheckEmptyArgument.cmake
Marc Chevrier 1df3287bf6 add_test: Restore support for empty test arguments
This was regressed by refactoring in commit e08ba229ee (CMake code rely
on cmList class for CMake lists management (part. 1), 2023-04-14,
v3.27.0-rc1~174^2).  Fix it and add a test case.

Fixes: #24986
2023-06-09 09:47:52 -04:00

12 lines
283 B
CMake

if (NOT CMAKE_ARGV4 STREQUAL "A")
message(FATAL_ERROR "wrong parsing of arguments")
endif()
if (NOT CMAKE_ARGV5 STREQUAL "")
message(FATAL_ERROR "Empty argument was dropped")
endif()
if (NOT CMAKE_ARGV6 STREQUAL "B")
message(FATAL_ERROR "wrong parsing of arguments")
endif()