From 144068e270a5e99fb6c3e5dbea0eb94d0bd8fd79 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 29 Oct 2013 09:55:43 -0400 Subject: Add to RunCMake.Syntax test comments not separated by spaces Extend the BracketComment5 test case to cover both bracket comments and line comments starting immediately after a bracket comment closes. --- Tests/RunCMake/Syntax/BracketComment5.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Tests/RunCMake/Syntax/BracketComment5.cmake b/Tests/RunCMake/Syntax/BracketComment5.cmake index bb6d9f3..dc9e6b4 100644 --- a/Tests/RunCMake/Syntax/BracketComment5.cmake +++ b/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.") -- cgit v0.12 From 8640e5297911df98521b2b835aa1c024adbf845e Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 29 Oct 2013 10:21:50 -0400 Subject: Add to RunCMake.Syntax test \-escape cases Add an Escape1 test case covering \-escape cases inside bracket, quoted, and unquoted arguments. Also cover comments immediately after quoted and unquoted arguments on lines containing \# escapes. --- Tests/RunCMake/Syntax/Escape1-stderr.txt | 3 +++ Tests/RunCMake/Syntax/Escape1.cmake | 3 +++ Tests/RunCMake/Syntax/RunCMakeTest.cmake | 1 + 3 files changed, 7 insertions(+) create mode 100644 Tests/RunCMake/Syntax/Escape1-stderr.txt create mode 100644 Tests/RunCMake/Syntax/Escape1.cmake diff --git a/Tests/RunCMake/Syntax/Escape1-stderr.txt b/Tests/RunCMake/Syntax/Escape1-stderr.txt new file mode 100644 index 0000000..6601ce7 --- /dev/null +++ b/Tests/RunCMake/Syntax/Escape1-stderr.txt @@ -0,0 +1,3 @@ +^\\##\[\[#\]\]#\[\[\]\]x#\\" +\$\@\^\\; \(\)#\\" +\$\@\^; \(\)$ diff --git a/Tests/RunCMake/Syntax/Escape1.cmake b/Tests/RunCMake/Syntax/Escape1.cmake new file mode 100644 index 0000000..3bf801e --- /dev/null +++ b/Tests/RunCMake/Syntax/Escape1.cmake @@ -0,0 +1,3 @@ +message([[\#]] \#[[ \#]] "#[[]]" x#comment + "\#\\\"\n\$\@\^\;\ \t\(\)"#comment + \#\\\"\n\$\@\^\;\ \t\(\)) diff --git a/Tests/RunCMake/Syntax/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake index 2d49f76..4f42a07 100644 --- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake +++ b/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) -- cgit v0.12