diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/FindPatch/Test/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/foreach/BadRangeInFunction-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/foreach/BadRangeInFunction-stderr.txt | 5 | ||||
-rw-r--r-- | Tests/RunCMake/foreach/BadRangeInFunction.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/foreach/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/foreach/RunCMakeTest.cmake | 3 |
7 files changed, 20 insertions, 2 deletions
diff --git a/Tests/FindPatch/Test/CMakeLists.txt b/Tests/FindPatch/Test/CMakeLists.txt index f4cd621..66c672c 100644 --- a/Tests/FindPatch/Test/CMakeLists.txt +++ b/Tests/FindPatch/Test/CMakeLists.txt @@ -70,8 +70,8 @@ index 68059b3..c6f30c2 100644 ) add_custom_target(TestPatch ALL - COMMAND ${Patch_EXECUTABLE} -p1 -i quote-add-author.patch - COMMAND Patch::patch -p1 -i quote-add-date.patch + COMMAND ${Patch_EXECUTABLE} -p1 -i quote-add-author.patch --binary + COMMAND Patch::patch -p1 -i quote-add-date.patch --binary COMMAND ${CMAKE_COMMAND} -E compare_files QUOTE.txt QUOTE.txt.baseline WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 07d9f08..f306200 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -219,6 +219,7 @@ add_RunCMake_test(find_library) add_RunCMake_test(find_package) add_RunCMake_test(find_path) add_RunCMake_test(find_program -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}) +add_RunCMake_test(foreach) add_RunCMake_test(get_filename_component) add_RunCMake_test(get_property) add_RunCMake_test(if) diff --git a/Tests/RunCMake/foreach/BadRangeInFunction-result.txt b/Tests/RunCMake/foreach/BadRangeInFunction-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/foreach/BadRangeInFunction-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/foreach/BadRangeInFunction-stderr.txt b/Tests/RunCMake/foreach/BadRangeInFunction-stderr.txt new file mode 100644 index 0000000..e16a0f1 --- /dev/null +++ b/Tests/RunCMake/foreach/BadRangeInFunction-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error at BadRangeInFunction.cmake:2 \(foreach\): + foreach called with incorrect range specification: start 2, stop 1, step 1 +Call Stack \(most recent call first\): + BadRangeInFunction.cmake:5 \(func\) + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/foreach/BadRangeInFunction.cmake b/Tests/RunCMake/foreach/BadRangeInFunction.cmake new file mode 100644 index 0000000..f51cbbf --- /dev/null +++ b/Tests/RunCMake/foreach/BadRangeInFunction.cmake @@ -0,0 +1,5 @@ +function(func) + foreach(bad_range RANGE 2 1 1) + endforeach() +endfunction() +func() diff --git a/Tests/RunCMake/foreach/CMakeLists.txt b/Tests/RunCMake/foreach/CMakeLists.txt new file mode 100644 index 0000000..bf2ef15 --- /dev/null +++ b/Tests/RunCMake/foreach/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.10) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/foreach/RunCMakeTest.cmake b/Tests/RunCMake/foreach/RunCMakeTest.cmake new file mode 100644 index 0000000..4b74cfe --- /dev/null +++ b/Tests/RunCMake/foreach/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(BadRangeInFunction) |