FPHSA: add (failing) unit test for found version being equal to 0.

This commit is contained in:
Yves Frederix 2017-09-05 20:58:36 +02:00
parent d75ccb1ce0
commit 8184433428
3 changed files with 9 additions and 0 deletions

View File

@ -4,6 +4,12 @@ run_cmake(BadFoundVar)
# The pseudo module will "find" a package with the given version. Check if the
# 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")
run_cmake(any_version)

View File

@ -0,0 +1,2 @@
Found Pseudo: [^
]*\(found version "0\"\)

View File

@ -0,0 +1 @@
find_package(Pseudo REQUIRED)