summaryrefslogtreecommitdiffstats
path: root/Tests/GeneratorExpression/check.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-10-12 15:34:16 (GMT)
committerBrad King <brad.king@kitware.com>2012-10-17 20:21:12 (GMT)
commite7230c71fdf9ed58b2e8fbf2064452a41ea57180 (patch)
treef952a656585fda75fadc9267bdd1cbdae5659590 /Tests/GeneratorExpression/check.cmake
parent145a4af8d3812fbd6a28f27e6fd4bb4d60d715af (diff)
downloadCMake-e7230c71fdf9ed58b2e8fbf2064452a41ea57180.zip
CMake-e7230c71fdf9ed58b2e8fbf2064452a41ea57180.tar.gz
CMake-e7230c71fdf9ed58b2e8fbf2064452a41ea57180.tar.bz2
GenEx: Fix termination bugs in generator expression parser.
Content which is incomplete as a generator expression could cause segfaults by advancing an iterator beyond end() and dereferencing it. Such incomplete generator expressions should be treated as plain text instead.
Diffstat (limited to 'Tests/GeneratorExpression/check.cmake')
-rw-r--r--Tests/GeneratorExpression/check.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/Tests/GeneratorExpression/check.cmake b/Tests/GeneratorExpression/check.cmake
index e46c1c1..bfdbd65 100644
--- a/Tests/GeneratorExpression/check.cmake
+++ b/Tests/GeneratorExpression/check.cmake
@@ -50,3 +50,25 @@ check(test_colons_2 "::")
check(test_colons_3 "Qt5::Core")
check(test_colons_4 "C:\\\\CMake")
check(test_colons_5 "C:/CMake")
+check(test_incomplete_1 "$<")
+check(test_incomplete_2 "$<something")
+check(test_incomplete_3 "$<something:")
+check(test_incomplete_4 "$<something:,")
+check(test_incomplete_5 "$something:,>")
+check(test_incomplete_6 "<something:,>")
+check(test_incomplete_7 "$<something::")
+check(test_incomplete_8 "$<something:,")
+check(test_incomplete_9 "$<something:,,")
+check(test_incomplete_10 "$<something:,:")
+check(test_incomplete_11 "$<something,,")
+check(test_incomplete_12 "$<,,")
+check(test_incomplete_13 "$<somespecialthing")
+check(test_incomplete_14 "$<<something")
+check(test_incomplete_15 "$<some$<thing")
+check(test_incomplete_16 "$<<some$<thing")
+check(test_incomplete_17 "some$thing")
+check(test_incomplete_18 "$<1:some,thing")
+check(test_incomplete_19 "$<1:some,thing>")
+check(test_incomplete_20 "$<CONFIGURATION>")
+check(test_incomplete_21 "$<BOOL:something>")
+check(test_incomplete_22 "$<BOOL:something")