summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-08-06 13:41:10 (GMT)
committerBrad King <brad.king@kitware.com>2013-08-08 17:26:26 (GMT)
commit1eafa3edaf34569cb6fa7eb449a9825049fe6270 (patch)
tree60123e7371cd69acabcec38f6662911c270aeb34 /Tests/RunCMake
parentf3155cd62ab669afc9d21bc877d5eb452ed94a7d (diff)
downloadCMake-1eafa3edaf34569cb6fa7eb449a9825049fe6270.zip
CMake-1eafa3edaf34569cb6fa7eb449a9825049fe6270.tar.gz
CMake-1eafa3edaf34569cb6fa7eb449a9825049fe6270.tar.bz2
cmListFileLexer: Fix line number after backslash in string
If a line inside a string ends in a backslash count the following newline character as a line increment. Add a test covering this case to verify that subsequent line numbers are correct.
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/Syntax/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedCall2-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedCall2-stderr.txt7
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedCall2.cmake3
4 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/Syntax/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
index 4a3d462..f2424c9 100644
--- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
@@ -6,4 +6,5 @@ run_cmake(StringNoSpace)
run_cmake(Unquoted0)
run_cmake(Unquoted1)
run_cmake(UnterminatedCall1)
+run_cmake(UnterminatedCall2)
run_cmake(UnterminatedString)
diff --git a/Tests/RunCMake/Syntax/UnterminatedCall2-result.txt b/Tests/RunCMake/Syntax/UnterminatedCall2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedCall2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/UnterminatedCall2-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedCall2-stderr.txt
new file mode 100644
index 0000000..065de30
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedCall2-stderr.txt
@@ -0,0 +1,7 @@
+CMake Error: Error in cmake code at
+.*/Syntax/UnterminatedCall2.cmake:4:
+Parse error. Function missing ending "\)". End of file reached.
+CMake Error at CMakeLists.txt:3 \(include\):
+ include could not find load file:
+
+ UnterminatedCall2.cmake
diff --git a/Tests/RunCMake/Syntax/UnterminatedCall2.cmake b/Tests/RunCMake/Syntax/UnterminatedCall2.cmake
new file mode 100644
index 0000000..26e9e62
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedCall2.cmake
@@ -0,0 +1,3 @@
+set(var "\
+")
+message(