mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
FPHSA: add (failing) unit test for found version being equal to 0.
This commit is contained in:
@@ -4,6 +4,12 @@ run_cmake(BadFoundVar)
|
|||||||
|
|
||||||
# The pseudo module will "find" a package with the given version. Check if the
|
# The pseudo module will "find" a package with the given version. Check if the
|
||||||
# version selection code in FPHSA works correctly.
|
# version selection code in FPHSA works correctly.
|
||||||
|
|
||||||
|
# Find a package with version 0.
|
||||||
|
set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudo_VERSION=0")
|
||||||
|
run_cmake(any_version_find_0)
|
||||||
|
|
||||||
|
# Find a package with a more customary version number.
|
||||||
set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudo_VERSION=1.2.3.4.5")
|
set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudo_VERSION=1.2.3.4.5")
|
||||||
run_cmake(any_version)
|
run_cmake(any_version)
|
||||||
|
|
||||||
|
|||||||
2
Tests/RunCMake/FPHSA/any_version_find_0-stdout.txt
Normal file
2
Tests/RunCMake/FPHSA/any_version_find_0-stdout.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Found Pseudo: [^
|
||||||
|
]*\(found version "0\"\)
|
||||||
1
Tests/RunCMake/FPHSA/any_version_find_0.cmake
Normal file
1
Tests/RunCMake/FPHSA/any_version_find_0.cmake
Normal file
@@ -0,0 +1 @@
|
|||||||
|
find_package(Pseudo REQUIRED)
|
||||||
Reference in New Issue
Block a user