ソースを参照

Merge topic 'cmake-syntax-test-escaped-comment'

8640e52 Add to RunCMake.Syntax test \-escape cases
144068e Add to RunCMake.Syntax test comments not separated by spaces
Brad King 12 年 前
コミット
6e900fbe69

+ 5 - 0
Tests/RunCMake/Syntax/BracketComment5.cmake

@@ -2,5 +2,10 @@
 message(FATAL_ERROR "This is commented out.")
 #]] #[[
 message(FATAL_ERROR "This is commented out.")
+#]]#[[
+message(FATAL_ERROR "This is commented out.")
 #]] #message(FATAL_ERROR "This is commented out.")
+#[[
+message(FATAL_ERROR "This is commented out.")
+#]]#message(FATAL_ERROR "This is commented out.")
 message(STATUS "The above FATAL_ERROR did not occur.")

+ 3 - 0
Tests/RunCMake/Syntax/Escape1-stderr.txt

@@ -0,0 +1,3 @@
+^\\##\[\[#\]\]#\[\[\]\]x#\\"
+\$\@\^\\; 	\(\)#\\"
+\$\@\^; 	\(\)$

+ 3 - 0
Tests/RunCMake/Syntax/Escape1.cmake

@@ -0,0 +1,3 @@
+message([[\#]] \#[[ \#]] "#[[]]" x#comment
+  "\#\\\"\n\$\@\^\;\ \t\(\)"#comment
+   \#\\\"\n\$\@\^\;\ \t\(\))

+ 1 - 0
Tests/RunCMake/Syntax/RunCMakeTest.cmake

@@ -39,6 +39,7 @@ run_cmake(BracketNoSpace2)
 run_cmake(BracketNoSpace3)
 run_cmake(BracketNoSpace4)
 run_cmake(BracketNoSpace5)
+run_cmake(Escape1)
 run_cmake(ParenNoSpace0)
 run_cmake(ParenNoSpace1)
 run_cmake(ParenNoSpace2)