summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/foreach/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-11-16 16:06:11 (GMT)
committerBrad King <brad.king@kitware.com>2017-11-16 16:10:05 (GMT)
commitfb114a40aa29c73c067a357d843cd12e187e95dc (patch)
treef167a8397183cc49db0c81cd12d70d2db6307712 /Tests/RunCMake/foreach/RunCMakeTest.cmake
parentc1930caffe827b937d05dca9ffb82ba0b0b20eb2 (diff)
downloadCMake-fb114a40aa29c73c067a357d843cd12e187e95dc.zip
CMake-fb114a40aa29c73c067a357d843cd12e187e95dc.tar.gz
CMake-fb114a40aa29c73c067a357d843cd12e187e95dc.tar.bz2
Tests: Add test for bad foreach inside a function
Add test for a case fixed by commit 6a4a61d9e1 (cmForEachCommand: prevent leakage, 2017-10-09). Prior to that fix, this test case could trigger an assertion failure. Fixes: #17464
Diffstat (limited to 'Tests/RunCMake/foreach/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/foreach/RunCMakeTest.cmake3
1 files changed, 3 insertions, 0 deletions
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)