diff options
author | Brad King <brad.king@kitware.com> | 2015-06-23 13:08:18 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-06-23 13:08:18 (GMT) |
commit | 5ab7dd544e2d10bf6b05ab046a852b84eee63126 (patch) | |
tree | 4510d75270473d5a30865c4afdfabefa8584bcfd /Tests/RunCMake/Syntax | |
parent | bddfe77d12ee7d6ecaa3c4fa8ade1c4c0cab5760 (diff) | |
parent | 5d85fb4f407cd661fb904f68e2c9cc27ddcc0331 (diff) | |
download | CMake-5ab7dd544e2d10bf6b05ab046a852b84eee63126.zip CMake-5ab7dd544e2d10bf6b05ab046a852b84eee63126.tar.gz CMake-5ab7dd544e2d10bf6b05ab046a852b84eee63126.tar.bz2 |
Merge topic 'fix-function-missing-end'
5d85fb4f Fix assertion failure on unmatched function or macro
Diffstat (limited to 'Tests/RunCMake/Syntax')
-rw-r--r-- | Tests/RunCMake/Syntax/FunctionUnmatched-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/FunctionUnmatched-stderr.txt | 6 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/FunctionUnmatched.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/MacroUnmatched-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/MacroUnmatched-stderr.txt | 6 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/MacroUnmatched.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/RunCMakeTest.cmake | 2 |
7 files changed, 20 insertions, 0 deletions
diff --git a/Tests/RunCMake/Syntax/FunctionUnmatched-result.txt b/Tests/RunCMake/Syntax/FunctionUnmatched-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/FunctionUnmatched-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/FunctionUnmatched-stderr.txt b/Tests/RunCMake/Syntax/FunctionUnmatched-stderr.txt new file mode 100644 index 0000000..776a8f2 --- /dev/null +++ b/Tests/RunCMake/Syntax/FunctionUnmatched-stderr.txt @@ -0,0 +1,6 @@ +^CMake Error at CMakeLists.txt:[0-9]+ \(include\): + A logical block opening on the line + + .*/Tests/RunCMake/Syntax/FunctionUnmatched.cmake:[0-9]+ \(function\) + + is not closed.$ diff --git a/Tests/RunCMake/Syntax/FunctionUnmatched.cmake b/Tests/RunCMake/Syntax/FunctionUnmatched.cmake new file mode 100644 index 0000000..515b6bf --- /dev/null +++ b/Tests/RunCMake/Syntax/FunctionUnmatched.cmake @@ -0,0 +1,2 @@ +function(f) +#endfunction() # missing diff --git a/Tests/RunCMake/Syntax/MacroUnmatched-result.txt b/Tests/RunCMake/Syntax/MacroUnmatched-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/MacroUnmatched-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/MacroUnmatched-stderr.txt b/Tests/RunCMake/Syntax/MacroUnmatched-stderr.txt new file mode 100644 index 0000000..1699c43 --- /dev/null +++ b/Tests/RunCMake/Syntax/MacroUnmatched-stderr.txt @@ -0,0 +1,6 @@ +^CMake Error at CMakeLists.txt:[0-9]+ \(include\): + A logical block opening on the line + + .*/Tests/RunCMake/Syntax/MacroUnmatched.cmake:[0-9]+ \(macro\) + + is not closed.$ diff --git a/Tests/RunCMake/Syntax/MacroUnmatched.cmake b/Tests/RunCMake/Syntax/MacroUnmatched.cmake new file mode 100644 index 0000000..302d96e --- /dev/null +++ b/Tests/RunCMake/Syntax/MacroUnmatched.cmake @@ -0,0 +1,2 @@ +macro(m) +#endmacro() # missing diff --git a/Tests/RunCMake/Syntax/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake index c431280..fd012b9 100644 --- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake +++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake @@ -110,5 +110,7 @@ run_cmake(CMP0053-NameWithEscapedSpacesQuoted) run_cmake(CMP0053-NameWithEscapedTabsQuoted) # Function and macro tests. +run_cmake(FunctionUnmatched) run_cmake(FunctionUnmatchedForeach) +run_cmake(MacroUnmatched) run_cmake(MacroUnmatchedForeach) |