summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Syntax
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/Syntax')
-rw-r--r--Tests/RunCMake/Syntax/.gitattributes3
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariable-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariable.cmake9
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableAtOnly-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableAtOnly.cmake8
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableAtOnlyFile-stderr.txt5
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableAtOnlyFile.cmake9
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableEmptyExpansion-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableEmptyExpansion.cmake8
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableEmptyExpansionAtOnly-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableEmptyExpansionAtOnly.cmake8
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableFile-stderr.txt5
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableFile.cmake8
-rw-r--r--Tests/RunCMake/Syntax/BOM-UTF-16-BE-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/BOM-UTF-16-BE-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/BOM-UTF-16-BE.cmakebin0 -> 54 bytes
-rw-r--r--Tests/RunCMake/Syntax/BOM-UTF-16-LE-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/BOM-UTF-16-LE-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/BOM-UTF-16-LE.cmakebin0 -> 54 bytes
-rw-r--r--Tests/RunCMake/Syntax/BOM-UTF-32-BE-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/BOM-UTF-32-BE-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/BOM-UTF-32-BE.cmakebin0 -> 108 bytes
-rw-r--r--Tests/RunCMake/Syntax/BOM-UTF-32-LE-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/BOM-UTF-32-LE-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/BOM-UTF-32-LE.cmakebin0 -> 108 bytes
-rw-r--r--Tests/RunCMake/Syntax/BOM-UTF-8-stdout.txt1
-rw-r--r--Tests/RunCMake/Syntax/BOM-UTF-8.cmake1
-rw-r--r--Tests/RunCMake/Syntax/Bracket0-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/Bracket0.cmake1
-rw-r--r--Tests/RunCMake/Syntax/Bracket1-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/Bracket1.cmake2
-rw-r--r--Tests/RunCMake/Syntax/Bracket2-stdout.txt2
-rw-r--r--Tests/RunCMake/Syntax/Bracket2.cmake2
-rw-r--r--Tests/RunCMake/Syntax/BracketBackslash-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/BracketBackslash-stderr.txt6
-rw-r--r--Tests/RunCMake/Syntax/BracketBackslash.cmake2
-rw-r--r--Tests/RunCMake/Syntax/BracketCRLF-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/BracketCRLF.cmake8
-rw-r--r--Tests/RunCMake/Syntax/BracketComment0-stdout.txt1
-rw-r--r--Tests/RunCMake/Syntax/BracketComment0.cmake5
-rw-r--r--Tests/RunCMake/Syntax/BracketComment1-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/BracketComment1-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/BracketComment1.cmake3
-rw-r--r--Tests/RunCMake/Syntax/BracketComment2-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/BracketComment2-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/BracketComment2.cmake3
-rw-r--r--Tests/RunCMake/Syntax/BracketComment3-stdout.txt1
-rw-r--r--Tests/RunCMake/Syntax/BracketComment3.cmake4
-rw-r--r--Tests/RunCMake/Syntax/BracketComment4-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/BracketComment4-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/BracketComment4.cmake3
-rw-r--r--Tests/RunCMake/Syntax/BracketComment5-stdout.txt1
-rw-r--r--Tests/RunCMake/Syntax/BracketComment5.cmake11
-rw-r--r--Tests/RunCMake/Syntax/BracketNoSpace0-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/BracketNoSpace0-stderr.txt6
-rw-r--r--Tests/RunCMake/Syntax/BracketNoSpace0.cmake1
-rw-r--r--Tests/RunCMake/Syntax/BracketNoSpace1-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/BracketNoSpace1-stderr.txt6
-rw-r--r--Tests/RunCMake/Syntax/BracketNoSpace1.cmake1
-rw-r--r--Tests/RunCMake/Syntax/BracketNoSpace2-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/BracketNoSpace2-stderr.txt6
-rw-r--r--Tests/RunCMake/Syntax/BracketNoSpace2.cmake1
-rw-r--r--Tests/RunCMake/Syntax/BracketNoSpace3-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/BracketNoSpace3-stderr.txt6
-rw-r--r--Tests/RunCMake/Syntax/BracketNoSpace3.cmake1
-rw-r--r--Tests/RunCMake/Syntax/BracketNoSpace4-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/BracketNoSpace4-stderr.txt6
-rw-r--r--Tests/RunCMake/Syntax/BracketNoSpace4.cmake1
-rw-r--r--Tests/RunCMake/Syntax/BracketNoSpace5-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/BracketNoSpace5-stderr.txt6
-rw-r--r--Tests/RunCMake/Syntax/BracketNoSpace5.cmake1
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-At-NEW-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-At-NEW.cmake9
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-At-OLD-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-At-OLD.cmake9
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-At-WARN-newlines-stderr.txt27
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-At-WARN-newlines.cmake6
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-At-WARN-stderr.txt21
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-At-WARN.cmake4
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NUL-stderr.txt56
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NUL.cmake6
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn.cmake2
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturnQuoted.cmake2
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces.cmake2
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpacesQuoted.cmake2
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs.cmake2
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabsQuoted.cmake2
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithNewline-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithNewline-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithNewline.cmake2
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithNewlineQuoted.cmake2
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithSpaces-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithSpaces-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithSpaces.cmake2
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted.cmake2
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithTabs-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithTabs-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithTabs.cmake2
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted.cmake2
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-ParenInENV-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-ParenInENV.cmake3
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-ParenInQuotedENV-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-ParenInQuotedENV.cmake3
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-WARN-stderr.txt28
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-WARN.cmake5
-rw-r--r--Tests/RunCMake/Syntax/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/Syntax/CommandComments-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/CommandComments.cmake6
-rw-r--r--Tests/RunCMake/Syntax/CommandEOF-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/CommandEOF-stderr.txt6
-rw-r--r--Tests/RunCMake/Syntax/CommandEOF.cmake1
-rw-r--r--Tests/RunCMake/Syntax/CommandError0-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/CommandError0-stderr.txt6
-rw-r--r--Tests/RunCMake/Syntax/CommandError0.cmake2
-rw-r--r--Tests/RunCMake/Syntax/CommandError1-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/CommandError1-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/CommandError1.cmake1
-rw-r--r--Tests/RunCMake/Syntax/CommandError2-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/CommandError2-stderr.txt5
-rw-r--r--Tests/RunCMake/Syntax/CommandError2.cmake1
-rw-r--r--Tests/RunCMake/Syntax/CommandNewlines-stderr.txt3
-rw-r--r--Tests/RunCMake/Syntax/CommandNewlines.cmake10
-rw-r--r--Tests/RunCMake/Syntax/CommandSpaces-stderr.txt6
-rw-r--r--Tests/RunCMake/Syntax/CommandSpaces.cmake6
-rw-r--r--Tests/RunCMake/Syntax/CommandTabs-stderr.txt6
-rw-r--r--Tests/RunCMake/Syntax/CommandTabs.cmake6
-rw-r--r--Tests/RunCMake/Syntax/Escape1-stderr.txt3
-rw-r--r--Tests/RunCMake/Syntax/Escape1.cmake3
-rw-r--r--Tests/RunCMake/Syntax/Escape2-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/Escape2-stderr.txt13
-rw-r--r--Tests/RunCMake/Syntax/Escape2.cmake7
-rw-r--r--Tests/RunCMake/Syntax/EscapeChar-char-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/EscapeChar-char-stderr.txt.in12
-rw-r--r--Tests/RunCMake/Syntax/EscapeChar-char.cmake.in3
-rw-r--r--Tests/RunCMake/Syntax/EscapeCharsAllowed-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/EscapeCharsAllowed.cmake26
-rw-r--r--Tests/RunCMake/Syntax/EscapeCharsDisallowed.cmake42
-rw-r--r--Tests/RunCMake/Syntax/EscapeQuotes-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/EscapeQuotes.cmake9
-rw-r--r--Tests/RunCMake/Syntax/EscapedAt-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/EscapedAt.cmake5
-rw-r--r--Tests/RunCMake/Syntax/ExpandInAt-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/ExpandInAt.cmake6
-rw-r--r--Tests/RunCMake/Syntax/ForEachBracket1-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/ForEachBracket1.cmake3
-rw-r--r--Tests/RunCMake/Syntax/FunctionBracket1-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/FunctionBracket1.cmake6
-rw-r--r--Tests/RunCMake/Syntax/FunctionUnmatched-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/FunctionUnmatched-stderr.txt8
-rw-r--r--Tests/RunCMake/Syntax/FunctionUnmatched.cmake2
-rw-r--r--Tests/RunCMake/Syntax/FunctionUnmatchedForeach-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/FunctionUnmatchedForeach-stderr.txt8
-rw-r--r--Tests/RunCMake/Syntax/FunctionUnmatchedForeach.cmake5
-rw-r--r--Tests/RunCMake/Syntax/MacroBracket1-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/MacroBracket1.cmake6
-rw-r--r--Tests/RunCMake/Syntax/MacroUnmatched-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/MacroUnmatched-stderr.txt8
-rw-r--r--Tests/RunCMake/Syntax/MacroUnmatched.cmake2
-rw-r--r--Tests/RunCMake/Syntax/MacroUnmatchedForeach-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/MacroUnmatchedForeach-stderr.txt8
-rw-r--r--Tests/RunCMake/Syntax/MacroUnmatchedForeach.cmake5
-rw-r--r--Tests/RunCMake/Syntax/NameWithCarriageReturn-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/NameWithCarriageReturn-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/NameWithCarriageReturn.cmake1
-rw-r--r--Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted.cmake1
-rw-r--r--Tests/RunCMake/Syntax/NameWithEscapedSpaces-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/NameWithEscapedSpaces-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/NameWithEscapedSpaces.cmake1
-rw-r--r--Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted.cmake1
-rw-r--r--Tests/RunCMake/Syntax/NameWithEscapedTabs-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/NameWithEscapedTabs-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/NameWithEscapedTabs.cmake1
-rw-r--r--Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted.cmake1
-rw-r--r--Tests/RunCMake/Syntax/NameWithNewline-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/NameWithNewline-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/NameWithNewline.cmake1
-rw-r--r--Tests/RunCMake/Syntax/NameWithNewlineQuoted-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/NameWithNewlineQuoted-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/NameWithNewlineQuoted.cmake1
-rw-r--r--Tests/RunCMake/Syntax/NameWithSpaces-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/NameWithSpaces-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/NameWithSpaces.cmake1
-rw-r--r--Tests/RunCMake/Syntax/NameWithSpacesQuoted-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/NameWithSpacesQuoted-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/NameWithSpacesQuoted.cmake1
-rw-r--r--Tests/RunCMake/Syntax/NameWithTabs-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/NameWithTabs-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/NameWithTabs.cmake1
-rw-r--r--Tests/RunCMake/Syntax/NameWithTabsQuoted-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/NameWithTabsQuoted-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/NameWithTabsQuoted.cmake1
-rw-r--r--Tests/RunCMake/Syntax/NullTerminatedArgument-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/NullTerminatedArgument-stderr.txt5
-rw-r--r--Tests/RunCMake/Syntax/NullTerminatedArgument.cmakebin0 -> 106 bytes
-rw-r--r--Tests/RunCMake/Syntax/OneLetter-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/OneLetter.cmake7
-rw-r--r--Tests/RunCMake/Syntax/ParenInENV-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/ParenInENV-stderr.txt20
-rw-r--r--Tests/RunCMake/Syntax/ParenInENV.cmake2
-rw-r--r--Tests/RunCMake/Syntax/ParenInQuotedENV-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/ParenInQuotedENV.cmake2
-rw-r--r--Tests/RunCMake/Syntax/ParenInVarName0-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/ParenInVarName0-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/ParenInVarName0.cmake4
-rw-r--r--Tests/RunCMake/Syntax/ParenInVarName1-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/ParenInVarName1-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/ParenInVarName1.cmake4
-rw-r--r--Tests/RunCMake/Syntax/ParenNoSpace0-stdout.txt3
-rw-r--r--Tests/RunCMake/Syntax/ParenNoSpace0.cmake3
-rw-r--r--Tests/RunCMake/Syntax/ParenNoSpace1-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/ParenNoSpace1-stderr.txt22
-rw-r--r--Tests/RunCMake/Syntax/ParenNoSpace1.cmake3
-rw-r--r--Tests/RunCMake/Syntax/ParenNoSpace2-stdout.txt3
-rw-r--r--Tests/RunCMake/Syntax/ParenNoSpace2.cmake3
-rw-r--r--Tests/RunCMake/Syntax/RunCMakeTest.cmake118
-rw-r--r--Tests/RunCMake/Syntax/String0-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/String0.cmake2
-rw-r--r--Tests/RunCMake/Syntax/String1-stderr.txt3
-rw-r--r--Tests/RunCMake/Syntax/String1.cmake3
-rw-r--r--Tests/RunCMake/Syntax/StringBackslash-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/StringBackslash-stderr.txt6
-rw-r--r--Tests/RunCMake/Syntax/StringBackslash.cmake2
-rw-r--r--Tests/RunCMake/Syntax/StringCRLF-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/StringCRLF.cmake6
-rw-r--r--Tests/RunCMake/Syntax/StringContinuation1-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/StringContinuation1-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/StringContinuation1.cmake2
-rw-r--r--Tests/RunCMake/Syntax/StringContinuation2-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/StringContinuation2-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/StringContinuation2.cmake2
-rw-r--r--Tests/RunCMake/Syntax/StringNoSpace-stderr.txt19
-rw-r--r--Tests/RunCMake/Syntax/StringNoSpace.cmake4
-rw-r--r--Tests/RunCMake/Syntax/Unquoted0-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/Unquoted0.cmake2
-rw-r--r--Tests/RunCMake/Syntax/Unquoted1-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/Unquoted1.cmake1
-rw-r--r--Tests/RunCMake/Syntax/Unquoted2-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/Unquoted2.cmake3
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBrace0-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBrace0.cmake2
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt13
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBrace1.cmake3
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBrace2-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt12
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBrace2.cmake4
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBracket0-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBracket0-stderr.txt7
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBracket0.cmake1
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBracket1-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBracket1-stderr.txt7
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBracket1.cmake1
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBracketComment-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBracketComment-stderr.txt7
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBracketComment.cmake2
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedCall1-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedCall1-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedCall1.cmake1
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedCall2-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedCall2-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedCall2.cmake3
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedString-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedString-stderr.txt7
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedString.cmake1
-rw-r--r--Tests/RunCMake/Syntax/atfile.txt.in4
281 files changed, 1368 insertions, 0 deletions
diff --git a/Tests/RunCMake/Syntax/.gitattributes b/Tests/RunCMake/Syntax/.gitattributes
new file mode 100644
index 0000000..79af285
--- /dev/null
+++ b/Tests/RunCMake/Syntax/.gitattributes
@@ -0,0 +1,3 @@
+CommandTabs.cmake whitespace=-tab-in-indent
+StringCRLF.cmake eol=crlf
+BracketCRLF.cmake eol=crlf
diff --git a/Tests/RunCMake/Syntax/AtWithVariable-stderr.txt b/Tests/RunCMake/Syntax/AtWithVariable-stderr.txt
new file mode 100644
index 0000000..5dcd4d7
--- /dev/null
+++ b/Tests/RunCMake/Syntax/AtWithVariable-stderr.txt
@@ -0,0 +1 @@
+-->wrong<--
diff --git a/Tests/RunCMake/Syntax/AtWithVariable.cmake b/Tests/RunCMake/Syntax/AtWithVariable.cmake
new file mode 100644
index 0000000..2bbf61d
--- /dev/null
+++ b/Tests/RunCMake/Syntax/AtWithVariable.cmake
@@ -0,0 +1,9 @@
+set(right "wrong")
+set(var "\${right}")
+# Expanded here.
+set(ref "@var@")
+
+# 'right' is dereferenced because 'var' was dereferenced when
+# assigning to 'ref' above.
+string(CONFIGURE "${ref}" output)
+message("-->${output}<--")
diff --git a/Tests/RunCMake/Syntax/AtWithVariableAtOnly-stderr.txt b/Tests/RunCMake/Syntax/AtWithVariableAtOnly-stderr.txt
new file mode 100644
index 0000000..cbd1be4
--- /dev/null
+++ b/Tests/RunCMake/Syntax/AtWithVariableAtOnly-stderr.txt
@@ -0,0 +1 @@
+-->\${right}<--
diff --git a/Tests/RunCMake/Syntax/AtWithVariableAtOnly.cmake b/Tests/RunCMake/Syntax/AtWithVariableAtOnly.cmake
new file mode 100644
index 0000000..e06484c
--- /dev/null
+++ b/Tests/RunCMake/Syntax/AtWithVariableAtOnly.cmake
@@ -0,0 +1,8 @@
+set(right "wrong")
+set(var "\${right}")
+# Expanded here.
+set(ref "@var@")
+
+# No dereference done at all.
+string(CONFIGURE "${ref}" output @ONLY)
+message("-->${output}<--")
diff --git a/Tests/RunCMake/Syntax/AtWithVariableAtOnlyFile-stderr.txt b/Tests/RunCMake/Syntax/AtWithVariableAtOnlyFile-stderr.txt
new file mode 100644
index 0000000..90bffb6
--- /dev/null
+++ b/Tests/RunCMake/Syntax/AtWithVariableAtOnlyFile-stderr.txt
@@ -0,0 +1,5 @@
+-->==>\${right}<==
+==><==
+==>\${var}<==
+==>\${empty}<==
+<--
diff --git a/Tests/RunCMake/Syntax/AtWithVariableAtOnlyFile.cmake b/Tests/RunCMake/Syntax/AtWithVariableAtOnlyFile.cmake
new file mode 100644
index 0000000..bdd7bcd
--- /dev/null
+++ b/Tests/RunCMake/Syntax/AtWithVariableAtOnlyFile.cmake
@@ -0,0 +1,9 @@
+set(right "wrong")
+set(var "\${right}")
+
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/atfile.txt.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/atfile.txt"
+ @ONLY)
+file(READ "${CMAKE_CURRENT_BINARY_DIR}/atfile.txt" output)
+message("-->${output}<--")
diff --git a/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansion-stderr.txt b/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansion-stderr.txt
new file mode 100644
index 0000000..cbd1be4
--- /dev/null
+++ b/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansion-stderr.txt
@@ -0,0 +1 @@
+-->\${right}<--
diff --git a/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansion.cmake b/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansion.cmake
new file mode 100644
index 0000000..840c7f0
--- /dev/null
+++ b/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansion.cmake
@@ -0,0 +1,8 @@
+# Literal since 'var' is not defined.
+set(ref "@var@")
+set(right "wrong")
+set(var "\${right}")
+
+# 'var' is dereferenced here.
+string(CONFIGURE "${ref}" output)
+message("-->${output}<--")
diff --git a/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansionAtOnly-stderr.txt b/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansionAtOnly-stderr.txt
new file mode 100644
index 0000000..cbd1be4
--- /dev/null
+++ b/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansionAtOnly-stderr.txt
@@ -0,0 +1 @@
+-->\${right}<--
diff --git a/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansionAtOnly.cmake b/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansionAtOnly.cmake
new file mode 100644
index 0000000..b657506
--- /dev/null
+++ b/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansionAtOnly.cmake
@@ -0,0 +1,8 @@
+# Literal since 'var' is not defined.
+set(ref "@var@")
+set(right "wrong")
+set(var "\${right}")
+
+# 'var' is dereferenced, but now 'right'
+string(CONFIGURE "${ref}" output @ONLY)
+message("-->${output}<--")
diff --git a/Tests/RunCMake/Syntax/AtWithVariableFile-stderr.txt b/Tests/RunCMake/Syntax/AtWithVariableFile-stderr.txt
new file mode 100644
index 0000000..43f029f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/AtWithVariableFile-stderr.txt
@@ -0,0 +1,5 @@
+-->==>\${right}<==
+==><==
+==>\${right}<==
+==><==
+<--
diff --git a/Tests/RunCMake/Syntax/AtWithVariableFile.cmake b/Tests/RunCMake/Syntax/AtWithVariableFile.cmake
new file mode 100644
index 0000000..c709099
--- /dev/null
+++ b/Tests/RunCMake/Syntax/AtWithVariableFile.cmake
@@ -0,0 +1,8 @@
+set(right "wrong")
+set(var "\${right}")
+
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/atfile.txt.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/atfile.txt")
+file(READ "${CMAKE_CURRENT_BINARY_DIR}/atfile.txt" output)
+message("-->${output}<--")
diff --git a/Tests/RunCMake/Syntax/BOM-UTF-16-BE-result.txt b/Tests/RunCMake/Syntax/BOM-UTF-16-BE-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BOM-UTF-16-BE-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/BOM-UTF-16-BE-stderr.txt b/Tests/RunCMake/Syntax/BOM-UTF-16-BE-stderr.txt
new file mode 100644
index 0000000..f0b6783
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BOM-UTF-16-BE-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error in BOM-UTF-16-BE.cmake:
+ File starts with a Byte-Order-Mark that is not UTF-8.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BOM-UTF-16-BE.cmake b/Tests/RunCMake/Syntax/BOM-UTF-16-BE.cmake
new file mode 100644
index 0000000..c51f6e6
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BOM-UTF-16-BE.cmake
Binary files differ
diff --git a/Tests/RunCMake/Syntax/BOM-UTF-16-LE-result.txt b/Tests/RunCMake/Syntax/BOM-UTF-16-LE-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BOM-UTF-16-LE-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/BOM-UTF-16-LE-stderr.txt b/Tests/RunCMake/Syntax/BOM-UTF-16-LE-stderr.txt
new file mode 100644
index 0000000..bcc9c38
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BOM-UTF-16-LE-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error in BOM-UTF-16-LE.cmake:
+ File starts with a Byte-Order-Mark that is not UTF-8.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BOM-UTF-16-LE.cmake b/Tests/RunCMake/Syntax/BOM-UTF-16-LE.cmake
new file mode 100644
index 0000000..b57446f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BOM-UTF-16-LE.cmake
Binary files differ
diff --git a/Tests/RunCMake/Syntax/BOM-UTF-32-BE-result.txt b/Tests/RunCMake/Syntax/BOM-UTF-32-BE-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BOM-UTF-32-BE-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/BOM-UTF-32-BE-stderr.txt b/Tests/RunCMake/Syntax/BOM-UTF-32-BE-stderr.txt
new file mode 100644
index 0000000..7bd74c9
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BOM-UTF-32-BE-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error in BOM-UTF-32-BE.cmake:
+ File starts with a Byte-Order-Mark that is not UTF-8.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BOM-UTF-32-BE.cmake b/Tests/RunCMake/Syntax/BOM-UTF-32-BE.cmake
new file mode 100644
index 0000000..23c57f3
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BOM-UTF-32-BE.cmake
Binary files differ
diff --git a/Tests/RunCMake/Syntax/BOM-UTF-32-LE-result.txt b/Tests/RunCMake/Syntax/BOM-UTF-32-LE-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BOM-UTF-32-LE-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/BOM-UTF-32-LE-stderr.txt b/Tests/RunCMake/Syntax/BOM-UTF-32-LE-stderr.txt
new file mode 100644
index 0000000..678013f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BOM-UTF-32-LE-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error in BOM-UTF-32-LE.cmake:
+ File starts with a Byte-Order-Mark that is not UTF-8.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BOM-UTF-32-LE.cmake b/Tests/RunCMake/Syntax/BOM-UTF-32-LE.cmake
new file mode 100644
index 0000000..c330f5b
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BOM-UTF-32-LE.cmake
Binary files differ
diff --git a/Tests/RunCMake/Syntax/BOM-UTF-8-stdout.txt b/Tests/RunCMake/Syntax/BOM-UTF-8-stdout.txt
new file mode 100644
index 0000000..5776d6e
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BOM-UTF-8-stdout.txt
@@ -0,0 +1 @@
+-- message
diff --git a/Tests/RunCMake/Syntax/BOM-UTF-8.cmake b/Tests/RunCMake/Syntax/BOM-UTF-8.cmake
new file mode 100644
index 0000000..bdff83b
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BOM-UTF-8.cmake
@@ -0,0 +1 @@
+message(STATUS "message")
diff --git a/Tests/RunCMake/Syntax/Bracket0-stderr.txt b/Tests/RunCMake/Syntax/Bracket0-stderr.txt
new file mode 100644
index 0000000..39cc2bc
--- /dev/null
+++ b/Tests/RunCMake/Syntax/Bracket0-stderr.txt
@@ -0,0 +1 @@
+^1 \${var} \\n 4$
diff --git a/Tests/RunCMake/Syntax/Bracket0.cmake b/Tests/RunCMake/Syntax/Bracket0.cmake
new file mode 100644
index 0000000..4bc0172
--- /dev/null
+++ b/Tests/RunCMake/Syntax/Bracket0.cmake
@@ -0,0 +1 @@
+message([[1 ${var} \n 4]])
diff --git a/Tests/RunCMake/Syntax/Bracket1-stderr.txt b/Tests/RunCMake/Syntax/Bracket1-stderr.txt
new file mode 100644
index 0000000..e1e13c1
--- /dev/null
+++ b/Tests/RunCMake/Syntax/Bracket1-stderr.txt
@@ -0,0 +1 @@
+^1 \${var} \\n 4\]==$
diff --git a/Tests/RunCMake/Syntax/Bracket1.cmake b/Tests/RunCMake/Syntax/Bracket1.cmake
new file mode 100644
index 0000000..587a575
--- /dev/null
+++ b/Tests/RunCMake/Syntax/Bracket1.cmake
@@ -0,0 +1,2 @@
+message([==[1 ]==] [=[
+${var} \n 4]==]=])
diff --git a/Tests/RunCMake/Syntax/Bracket2-stdout.txt b/Tests/RunCMake/Syntax/Bracket2-stdout.txt
new file mode 100644
index 0000000..0f8aa2f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/Bracket2-stdout.txt
@@ -0,0 +1,2 @@
+-- Bracket Argument 1
+-- Bracket Argument 2
diff --git a/Tests/RunCMake/Syntax/Bracket2.cmake b/Tests/RunCMake/Syntax/Bracket2.cmake
new file mode 100644
index 0000000..5c5feed
--- /dev/null
+++ b/Tests/RunCMake/Syntax/Bracket2.cmake
@@ -0,0 +1,2 @@
+message(STATUS [[Bracket Argument 1]] #[[Bracket Comment 1]])
+message(STATUS #[[Bracket Comment 2]] [[Bracket Argument 2]])
diff --git a/Tests/RunCMake/Syntax/BracketBackslash-result.txt b/Tests/RunCMake/Syntax/BracketBackslash-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketBackslash-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/BracketBackslash-stderr.txt b/Tests/RunCMake/Syntax/BracketBackslash-stderr.txt
new file mode 100644
index 0000000..b746953
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketBackslash-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at BracketBackslash.cmake:1 \(message\):
+ a\\
+
+ b
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/BracketBackslash.cmake b/Tests/RunCMake/Syntax/BracketBackslash.cmake
new file mode 100644
index 0000000..5478e5d
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketBackslash.cmake
@@ -0,0 +1,2 @@
+message(FATAL_ERROR [==[a\
+b]==])
diff --git a/Tests/RunCMake/Syntax/BracketCRLF-stderr.txt b/Tests/RunCMake/Syntax/BracketCRLF-stderr.txt
new file mode 100644
index 0000000..7aef26e
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketCRLF-stderr.txt
@@ -0,0 +1 @@
+CRLF->LF worked
diff --git a/Tests/RunCMake/Syntax/BracketCRLF.cmake b/Tests/RunCMake/Syntax/BracketCRLF.cmake
new file mode 100644
index 0000000..2ea6df2
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketCRLF.cmake
@@ -0,0 +1,8 @@
+if([[
+]] STREQUAL "" AND
+[[a
+b]] STREQUAL "a\nb")
+ message("CRLF->LF worked")
+else()
+ message(FATAL_ERROR "CRLF->LF failed")
+endif()
diff --git a/Tests/RunCMake/Syntax/BracketComment0-stdout.txt b/Tests/RunCMake/Syntax/BracketComment0-stdout.txt
new file mode 100644
index 0000000..c9c0be4
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketComment0-stdout.txt
@@ -0,0 +1 @@
+-- The above FATAL_ERROR did not occur.
diff --git a/Tests/RunCMake/Syntax/BracketComment0.cmake b/Tests/RunCMake/Syntax/BracketComment0.cmake
new file mode 100644
index 0000000..0ee95de
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketComment0.cmake
@@ -0,0 +1,5 @@
+#[=[
+#]]
+message(FATAL_ERROR "This is commented out.")
+#]==]=]
+message(STATUS "The above FATAL_ERROR did not occur.")
diff --git a/Tests/RunCMake/Syntax/BracketComment1-result.txt b/Tests/RunCMake/Syntax/BracketComment1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketComment1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/BracketComment1-stderr.txt b/Tests/RunCMake/Syntax/BracketComment1-stderr.txt
new file mode 100644
index 0000000..a9373de
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketComment1-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at BracketComment1.cmake:2 \(message\):
+ This is not commented out.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BracketComment1.cmake b/Tests/RunCMake/Syntax/BracketComment1.cmake
new file mode 100644
index 0000000..2ec9d20
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketComment1.cmake
@@ -0,0 +1,3 @@
+##[[
+message(FATAL_ERROR "This is not commented out.")
+#]]
diff --git a/Tests/RunCMake/Syntax/BracketComment2-result.txt b/Tests/RunCMake/Syntax/BracketComment2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketComment2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/BracketComment2-stderr.txt b/Tests/RunCMake/Syntax/BracketComment2-stderr.txt
new file mode 100644
index 0000000..7e98222
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketComment2-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at BracketComment2.cmake:2 \(message\):
+ This is not commented out.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BracketComment2.cmake b/Tests/RunCMake/Syntax/BracketComment2.cmake
new file mode 100644
index 0000000..3eda32d
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketComment2.cmake
@@ -0,0 +1,3 @@
+# [[
+message(FATAL_ERROR "This is not commented out.")
+#]]
diff --git a/Tests/RunCMake/Syntax/BracketComment3-stdout.txt b/Tests/RunCMake/Syntax/BracketComment3-stdout.txt
new file mode 100644
index 0000000..c9c0be4
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketComment3-stdout.txt
@@ -0,0 +1 @@
+-- The above FATAL_ERROR did not occur.
diff --git a/Tests/RunCMake/Syntax/BracketComment3.cmake b/Tests/RunCMake/Syntax/BracketComment3.cmake
new file mode 100644
index 0000000..ffd03a9
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketComment3.cmake
@@ -0,0 +1,4 @@
+#[[Text on opening line
+message(FATAL_ERROR "This is commented out.")
+#]=]]
+message(STATUS "The above FATAL_ERROR did not occur.")
diff --git a/Tests/RunCMake/Syntax/BracketComment4-result.txt b/Tests/RunCMake/Syntax/BracketComment4-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketComment4-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/BracketComment4-stderr.txt b/Tests/RunCMake/Syntax/BracketComment4-stderr.txt
new file mode 100644
index 0000000..6bbb980
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketComment4-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at BracketComment4.cmake:3:
+ Parse error. Expected a newline, got identifier with text "message".
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BracketComment4.cmake b/Tests/RunCMake/Syntax/BracketComment4.cmake
new file mode 100644
index 0000000..9d586f1
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketComment4.cmake
@@ -0,0 +1,3 @@
+#[[
+message(FATAL_ERROR "This is commented out.")
+#]] message(STATUS "This command not allowed here")
diff --git a/Tests/RunCMake/Syntax/BracketComment5-stdout.txt b/Tests/RunCMake/Syntax/BracketComment5-stdout.txt
new file mode 100644
index 0000000..c9c0be4
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketComment5-stdout.txt
@@ -0,0 +1 @@
+-- The above FATAL_ERROR did not occur.
diff --git a/Tests/RunCMake/Syntax/BracketComment5.cmake b/Tests/RunCMake/Syntax/BracketComment5.cmake
new file mode 100644
index 0000000..dc9e6b4
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketComment5.cmake
@@ -0,0 +1,11 @@
+#[[
+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.")
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace0-result.txt b/Tests/RunCMake/Syntax/BracketNoSpace0-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketNoSpace0-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace0-stderr.txt b/Tests/RunCMake/Syntax/BracketNoSpace0-stderr.txt
new file mode 100644
index 0000000..0a52022
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketNoSpace0-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at BracketNoSpace0.cmake:1:
+ Syntax Error in cmake code at column 27
+
+ Argument not separated from preceding token by whitespace.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace0.cmake b/Tests/RunCMake/Syntax/BracketNoSpace0.cmake
new file mode 100644
index 0000000..1de1450
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketNoSpace0.cmake
@@ -0,0 +1 @@
+message(STATUS [[bracket]]unquoted)
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace1-result.txt b/Tests/RunCMake/Syntax/BracketNoSpace1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketNoSpace1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace1-stderr.txt b/Tests/RunCMake/Syntax/BracketNoSpace1-stderr.txt
new file mode 100644
index 0000000..43bf995
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketNoSpace1-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at BracketNoSpace1.cmake:1:
+ Syntax Error in cmake code at column 24
+
+ Argument not separated from preceding token by whitespace.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace1.cmake b/Tests/RunCMake/Syntax/BracketNoSpace1.cmake
new file mode 100644
index 0000000..7982bf3
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketNoSpace1.cmake
@@ -0,0 +1 @@
+message(STATUS "string"[[bracket]])
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace2-result.txt b/Tests/RunCMake/Syntax/BracketNoSpace2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketNoSpace2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace2-stderr.txt b/Tests/RunCMake/Syntax/BracketNoSpace2-stderr.txt
new file mode 100644
index 0000000..f78b4bd
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketNoSpace2-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at BracketNoSpace2.cmake:1:
+ Syntax Error in cmake code at column 44
+
+ Argument not separated from preceding token by whitespace.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace2.cmake b/Tests/RunCMake/Syntax/BracketNoSpace2.cmake
new file mode 100644
index 0000000..f1507f3
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketNoSpace2.cmake
@@ -0,0 +1 @@
+message(STATUS "string"#[[bracket comment]][[bracket]])
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace3-result.txt b/Tests/RunCMake/Syntax/BracketNoSpace3-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketNoSpace3-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace3-stderr.txt b/Tests/RunCMake/Syntax/BracketNoSpace3-stderr.txt
new file mode 100644
index 0000000..63ca600
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketNoSpace3-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at BracketNoSpace3.cmake:1:
+ Syntax Error in cmake code at column 45
+
+ Argument not separated from preceding token by whitespace.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace3.cmake b/Tests/RunCMake/Syntax/BracketNoSpace3.cmake
new file mode 100644
index 0000000..45dc900
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketNoSpace3.cmake
@@ -0,0 +1 @@
+message(STATUS "string" #[[bracket comment]][[bracket]])
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace4-result.txt b/Tests/RunCMake/Syntax/BracketNoSpace4-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketNoSpace4-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace4-stderr.txt b/Tests/RunCMake/Syntax/BracketNoSpace4-stderr.txt
new file mode 100644
index 0000000..318b0e3
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketNoSpace4-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at BracketNoSpace4.cmake:1:
+ Syntax Error in cmake code at column 44
+
+ Argument not separated from preceding token by whitespace.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace4.cmake b/Tests/RunCMake/Syntax/BracketNoSpace4.cmake
new file mode 100644
index 0000000..cb4ddbe
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketNoSpace4.cmake
@@ -0,0 +1 @@
+message(STATUS "string"#[[bracket comment]]"string")
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace5-result.txt b/Tests/RunCMake/Syntax/BracketNoSpace5-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketNoSpace5-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace5-stderr.txt b/Tests/RunCMake/Syntax/BracketNoSpace5-stderr.txt
new file mode 100644
index 0000000..a68478a
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketNoSpace5-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at BracketNoSpace5.cmake:1:
+ Syntax Error in cmake code at column 45
+
+ Argument not separated from preceding token by whitespace.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace5.cmake b/Tests/RunCMake/Syntax/BracketNoSpace5.cmake
new file mode 100644
index 0000000..c684523
--- /dev/null
+++ b/Tests/RunCMake/Syntax/BracketNoSpace5.cmake
@@ -0,0 +1 @@
+message(STATUS "string" #[[bracket comment]]"string")
diff --git a/Tests/RunCMake/Syntax/CMP0053-At-NEW-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-At-NEW-stderr.txt
new file mode 100644
index 0000000..e3e5332
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-At-NEW-stderr.txt
@@ -0,0 +1 @@
+^-->\${right}<--$
diff --git a/Tests/RunCMake/Syntax/CMP0053-At-NEW.cmake b/Tests/RunCMake/Syntax/CMP0053-At-NEW.cmake
new file mode 100644
index 0000000..40dbe46
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-At-NEW.cmake
@@ -0,0 +1,9 @@
+cmake_policy(SET CMP0053 NEW)
+
+set(right "wrong")
+set(var "\${right}")
+# Not expanded here with the new policy.
+set(ref "@var@")
+
+string(CONFIGURE "${ref}" output)
+message("-->${output}<--")
diff --git a/Tests/RunCMake/Syntax/CMP0053-At-OLD-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-At-OLD-stderr.txt
new file mode 100644
index 0000000..0dde1bc
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-At-OLD-stderr.txt
@@ -0,0 +1,12 @@
+^CMake Deprecation Warning at CMP0053-At-OLD.cmake:1 \(cmake_policy\):
+ The OLD behavior for policy CMP0053 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+-->wrong<--$
diff --git a/Tests/RunCMake/Syntax/CMP0053-At-OLD.cmake b/Tests/RunCMake/Syntax/CMP0053-At-OLD.cmake
new file mode 100644
index 0000000..666f107
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-At-OLD.cmake
@@ -0,0 +1,9 @@
+cmake_policy(SET CMP0053 OLD)
+
+set(right "wrong")
+set(var "\${right}")
+# Expanded here with the old policy.
+set(ref "@var@")
+
+string(CONFIGURE "${ref}" output)
+message("-->${output}<--")
diff --git a/Tests/RunCMake/Syntax/CMP0053-At-WARN-newlines-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-At-WARN-newlines-stderr.txt
new file mode 100644
index 0000000..ec37021
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-At-WARN-newlines-stderr.txt
@@ -0,0 +1,27 @@
+^CMake Warning \(dev\) at CMP0053-At-WARN-newlines.cmake:4 \(set\):
+ Policy CMP0053 is not set: Simplify variable reference and escape sequence
+ evaluation. Run "cmake --help-policy CMP0053" for policy details. Use the
+ cmake_policy command to set the policy and suppress this warning.
+
+ For input:
+
+ '
+ @var@
+ '
+
+ the old evaluation rules produce:
+
+ '
+ \${right}
+ '
+
+ but the new evaluation rules produce:
+
+ '
+ @var@
+ '
+
+ Using the old result for compatibility since the policy is not set.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.$
diff --git a/Tests/RunCMake/Syntax/CMP0053-At-WARN-newlines.cmake b/Tests/RunCMake/Syntax/CMP0053-At-WARN-newlines.cmake
new file mode 100644
index 0000000..c493505
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-At-WARN-newlines.cmake
@@ -0,0 +1,6 @@
+set(right "wrong")
+set(var "\${right}")
+# Expanded here with the old policy.
+set(ref "
+@var@
+")
diff --git a/Tests/RunCMake/Syntax/CMP0053-At-WARN-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-At-WARN-stderr.txt
new file mode 100644
index 0000000..697b7b3
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-At-WARN-stderr.txt
@@ -0,0 +1,21 @@
+^CMake Warning \(dev\) at CMP0053-At-WARN.cmake:4 \(set\):
+ Policy CMP0053 is not set: Simplify variable reference and escape sequence
+ evaluation. Run "cmake --help-policy CMP0053" for policy details. Use the
+ cmake_policy command to set the policy and suppress this warning.
+
+ For input:
+
+ '@var@'
+
+ the old evaluation rules produce:
+
+ '\${right}'
+
+ but the new evaluation rules produce:
+
+ '@var@'
+
+ Using the old result for compatibility since the policy is not set.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.$
diff --git a/Tests/RunCMake/Syntax/CMP0053-At-WARN.cmake b/Tests/RunCMake/Syntax/CMP0053-At-WARN.cmake
new file mode 100644
index 0000000..19c7f53
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-At-WARN.cmake
@@ -0,0 +1,4 @@
+set(right "wrong")
+set(var "\${right}")
+# Expanded here with the old policy.
+set(ref "@var@")
diff --git a/Tests/RunCMake/Syntax/CMP0053-NUL-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-NUL-stderr.txt
new file mode 100644
index 0000000..09c7e7c
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NUL-stderr.txt
@@ -0,0 +1,56 @@
+^CMake Warning \(dev\) at CMP0053-NUL.cmake:1 \(set\):
+ Policy CMP0053 is not set: Simplify variable reference and escape sequence
+ evaluation. Run "cmake --help-policy CMP0053" for policy details. Use the
+ cmake_policy command to set the policy and suppress this warning.
+
+ For input:
+
+ '\\0'
+
+ the old evaluation rules produce:
+
+ ''
+
+ but the new evaluation rules produce an error:
+
+ Syntax error in cmake code at
+ .*/Tests/RunCMake/Syntax/CMP0053-NUL.cmake:1
+ when parsing string
+ \\0
+ Invalid character escape '\\0'.
+
+ Using the old result for compatibility since the policy is not set.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Warning \(dev\) at CMP0053-NUL.cmake:2 \(set\):
+ Policy CMP0053 is not set: Simplify variable reference and escape sequence
+ evaluation. Run "cmake --help-policy CMP0053" for policy details. Use the
+ cmake_policy command to set the policy and suppress this warning.
+
+ For input:
+
+ '\\0'
+
+ the old evaluation rules produce:
+
+ ''
+
+ but the new evaluation rules produce an error:
+
+ Syntax error in cmake code at
+ .*/Tests/RunCMake/Syntax/CMP0053-NUL.cmake:2
+ when parsing string
+ \\0
+ Invalid character escape '\\0'.
+
+ Using the old result for compatibility since the policy is not set.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+--><--
+--><--
+--><--
+--><--$
diff --git a/Tests/RunCMake/Syntax/CMP0053-NUL.cmake b/Tests/RunCMake/Syntax/CMP0053-NUL.cmake
new file mode 100644
index 0000000..9ae0906
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NUL.cmake
@@ -0,0 +1,6 @@
+set(qnul "\0")
+set(nul \0)
+message(-->${nul}<--)
+message(-->${qnul}<--)
+message("-->${nul}<--")
+message("-->${qnul}<--")
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn-result.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn-stderr.txt
new file mode 100644
index 0000000..9575778
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at CMP0053-NameWithCarriageReturn.cmake:2 \(message\):
+ message called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn.cmake
new file mode 100644
index 0000000..b8a403d
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message(${var\rwith\rcarriagereturn})
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturnQuoted.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturnQuoted.cmake
new file mode 100644
index 0000000..bb0d93f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturnQuoted.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message("${var\rwith\rcarriagereturn}")
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces-result.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces-stderr.txt
new file mode 100644
index 0000000..df67d37
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at CMP0053-NameWithEscapedSpaces.cmake:2 \(message\):
+ message called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces.cmake
new file mode 100644
index 0000000..805b2ca
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message(${var\ with\ escaped\ space})
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpacesQuoted.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpacesQuoted.cmake
new file mode 100644
index 0000000..58d8e8f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpacesQuoted.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message("${var\ with\ escaped\ space}")
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs-result.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs-stderr.txt
new file mode 100644
index 0000000..059044f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at CMP0053-NameWithEscapedTabs.cmake:2 \(message\):
+ message called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs.cmake
new file mode 100644
index 0000000..214ab5d
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message(${var\ with\ escaped\ tab})
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabsQuoted.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabsQuoted.cmake
new file mode 100644
index 0000000..aa5123f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabsQuoted.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message("${var\ with\ escaped\ tab}")
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithNewline-result.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithNewline-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithNewline-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithNewline-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithNewline-stderr.txt
new file mode 100644
index 0000000..41f86e6
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithNewline-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at CMP0053-NameWithNewline.cmake:2 \(message\):
+ message called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithNewline.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithNewline.cmake
new file mode 100644
index 0000000..45b532e
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithNewline.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message(${var\nwith\nnewline})
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithNewlineQuoted.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithNewlineQuoted.cmake
new file mode 100644
index 0000000..6fe568d
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithNewlineQuoted.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message("${var\nwith\nnewline}")
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces-result.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces-stderr.txt
new file mode 100644
index 0000000..95e8684
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces-stderr.txt
@@ -0,0 +1,12 @@
+^CMake Error at CMP0053-NameWithSpaces.cmake:2 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces.cmake:2
+
+ when parsing string
+
+ \${var
+
+ There is an unterminated variable reference.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces.cmake
new file mode 100644
index 0000000..dae7d25
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message(${var with space})
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted-result.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted-stderr.txt
new file mode 100644
index 0000000..c4f3cfe
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted-stderr.txt
@@ -0,0 +1,12 @@
+^CMake Error at CMP0053-NameWithSpacesQuoted.cmake:2 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted.cmake:2
+
+ when parsing string
+
+ \${var with space}
+
+ Invalid character \(' '\) in a variable name: 'var'
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted.cmake
new file mode 100644
index 0000000..e252cff
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message("${var with space}")
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithTabs-result.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithTabs-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithTabs-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithTabs-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithTabs-stderr.txt
new file mode 100644
index 0000000..b1678b3
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithTabs-stderr.txt
@@ -0,0 +1,12 @@
+^CMake Error at CMP0053-NameWithTabs.cmake:2 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/CMP0053-NameWithTabs.cmake:2
+
+ when parsing string
+
+ \${var
+
+ There is an unterminated variable reference.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithTabs.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithTabs.cmake
new file mode 100644
index 0000000..45e3045
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithTabs.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message(${var with tab})
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted-result.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted-stderr.txt
new file mode 100644
index 0000000..78adb5e
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted-stderr.txt
@@ -0,0 +1,12 @@
+^CMake Error at CMP0053-NameWithTabsQuoted.cmake:2 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted.cmake:2
+
+ when parsing string
+
+ \${var with tab}
+
+ Invalid character \(' '\) in a variable name: 'var'
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted.cmake
new file mode 100644
index 0000000..498675f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message("${var with tab}")
diff --git a/Tests/RunCMake/Syntax/CMP0053-ParenInENV-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-ParenInENV-stderr.txt
new file mode 100644
index 0000000..7020c7e
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-ParenInENV-stderr.txt
@@ -0,0 +1 @@
+-->value<--
diff --git a/Tests/RunCMake/Syntax/CMP0053-ParenInENV.cmake b/Tests/RunCMake/Syntax/CMP0053-ParenInENV.cmake
new file mode 100644
index 0000000..b5cdf0f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-ParenInENV.cmake
@@ -0,0 +1,3 @@
+cmake_policy(SET CMP0053 NEW)
+set("ENV{e(x)}" value)
+message(-->$ENV{e\(x\)}<--)
diff --git a/Tests/RunCMake/Syntax/CMP0053-ParenInQuotedENV-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-ParenInQuotedENV-stderr.txt
new file mode 100644
index 0000000..7020c7e
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-ParenInQuotedENV-stderr.txt
@@ -0,0 +1 @@
+-->value<--
diff --git a/Tests/RunCMake/Syntax/CMP0053-ParenInQuotedENV.cmake b/Tests/RunCMake/Syntax/CMP0053-ParenInQuotedENV.cmake
new file mode 100644
index 0000000..5559d4b
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-ParenInQuotedENV.cmake
@@ -0,0 +1,3 @@
+cmake_policy(SET CMP0053 NEW)
+set("ENV{e(x)}" value)
+message("-->$ENV{e\(x\)}<--")
diff --git a/Tests/RunCMake/Syntax/CMP0053-WARN-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-WARN-stderr.txt
new file mode 100644
index 0000000..c706939
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-WARN-stderr.txt
@@ -0,0 +1,28 @@
+^CMake Warning \(dev\) at CMP0053-WARN.cmake:2 \(message\):
+ Policy CMP0053 is not set: Simplify variable reference and escape sequence
+ evaluation. Run "cmake --help-policy CMP0053" for policy details. Use the
+ cmake_policy command to set the policy and suppress this warning.
+
+ For input:
+
+ '\\'
+
+ the old evaluation rules produce:
+
+ '\\'
+
+ but the new evaluation rules produce an error:
+
+ Syntax error in cmake code at
+ .*/Tests/RunCMake/Syntax/CMP0053-WARN.cmake:2
+ when parsing string
+ \\
+ Invalid character escape '\\' \(at end of input\).
+
+ Using the old result for compatibility since the policy is not set.
+Call Stack \(most recent call first\):
+ CMP0053-WARN.cmake:5 \(escape\)
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+\\$
diff --git a/Tests/RunCMake/Syntax/CMP0053-WARN.cmake b/Tests/RunCMake/Syntax/CMP0053-WARN.cmake
new file mode 100644
index 0000000..6e8b07b
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-WARN.cmake
@@ -0,0 +1,5 @@
+macro (escape str)
+ message("${str}")
+endmacro ()
+
+escape("\\")
diff --git a/Tests/RunCMake/Syntax/CMakeLists.txt b/Tests/RunCMake/Syntax/CMakeLists.txt
new file mode 100644
index 0000000..4b3de84
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 2.8.12)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/Syntax/CommandComments-stderr.txt b/Tests/RunCMake/Syntax/CommandComments-stderr.txt
new file mode 100644
index 0000000..df72cc5
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandComments-stderr.txt
@@ -0,0 +1,4 @@
+Example Message
+Example Message
+Example Message
+Second Line of Example
diff --git a/Tests/RunCMake/Syntax/CommandComments.cmake b/Tests/RunCMake/Syntax/CommandComments.cmake
new file mode 100644
index 0000000..0fd7484
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandComments.cmake
@@ -0,0 +1,6 @@
+message("Example Message"#)
+ )
+message ("Example Message" # )
+ )
+message( "Example Message\n" # "Commented" )
+ "Second Line of Example")
diff --git a/Tests/RunCMake/Syntax/CommandEOF-result.txt b/Tests/RunCMake/Syntax/CommandEOF-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandEOF-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/CommandEOF-stderr.txt b/Tests/RunCMake/Syntax/CommandEOF-stderr.txt
new file mode 100644
index 0000000..31cbc08
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandEOF-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error in CommandEOF.cmake:
+ Unexpected end of file.
+
+ Parse error. Function missing opening "\(".
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/CommandEOF.cmake b/Tests/RunCMake/Syntax/CommandEOF.cmake
new file mode 100644
index 0000000..36ebb02
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandEOF.cmake
@@ -0,0 +1 @@
+message \ No newline at end of file
diff --git a/Tests/RunCMake/Syntax/CommandError0-result.txt b/Tests/RunCMake/Syntax/CommandError0-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandError0-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/CommandError0-stderr.txt b/Tests/RunCMake/Syntax/CommandError0-stderr.txt
new file mode 100644
index 0000000..e584fb0
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandError0-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at CommandError0.cmake:2:
+ Parse error. Expected "\(", got newline with text "
+
+ ".
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/CommandError0.cmake b/Tests/RunCMake/Syntax/CommandError0.cmake
new file mode 100644
index 0000000..3222a97
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandError0.cmake
@@ -0,0 +1,2 @@
+message
+ ("Example Message")
diff --git a/Tests/RunCMake/Syntax/CommandError1-result.txt b/Tests/RunCMake/Syntax/CommandError1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandError1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/CommandError1-stderr.txt b/Tests/RunCMake/Syntax/CommandError1-stderr.txt
new file mode 100644
index 0000000..c3bf93c
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandError1-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CommandError1.cmake:1:
+ Parse error. Expected a newline, got identifier with text "message".
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/CommandError1.cmake b/Tests/RunCMake/Syntax/CommandError1.cmake
new file mode 100644
index 0000000..f8661a1
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandError1.cmake
@@ -0,0 +1 @@
+message("Example Message") message("Second Message")
diff --git a/Tests/RunCMake/Syntax/CommandError2-result.txt b/Tests/RunCMake/Syntax/CommandError2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandError2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/CommandError2-stderr.txt b/Tests/RunCMake/Syntax/CommandError2-stderr.txt
new file mode 100644
index 0000000..4fe28a9
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandError2-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at CommandError2.cmake:1:
+ Parse error. Expected a command name, got bracket argument with text
+ "oops-not-a-comment".
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/CommandError2.cmake b/Tests/RunCMake/Syntax/CommandError2.cmake
new file mode 100644
index 0000000..a269682
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandError2.cmake
@@ -0,0 +1 @@
+message("Example Message") [[oops-not-a-comment]]
diff --git a/Tests/RunCMake/Syntax/CommandNewlines-stderr.txt b/Tests/RunCMake/Syntax/CommandNewlines-stderr.txt
new file mode 100644
index 0000000..571b152
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandNewlines-stderr.txt
@@ -0,0 +1,3 @@
+Example Message
+Example Message
+Example Message
diff --git a/Tests/RunCMake/Syntax/CommandNewlines.cmake b/Tests/RunCMake/Syntax/CommandNewlines.cmake
new file mode 100644
index 0000000..0587afb
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandNewlines.cmake
@@ -0,0 +1,10 @@
+message(
+ "Example Message")
+message (
+ "Example Message"
+ )
+message(
+
+ "Example Message"
+
+ )
diff --git a/Tests/RunCMake/Syntax/CommandSpaces-stderr.txt b/Tests/RunCMake/Syntax/CommandSpaces-stderr.txt
new file mode 100644
index 0000000..54a8b38
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandSpaces-stderr.txt
@@ -0,0 +1,6 @@
+Example Message
+Example Message
+Example Message
+Example Message
+Example Message
+Example Message
diff --git a/Tests/RunCMake/Syntax/CommandSpaces.cmake b/Tests/RunCMake/Syntax/CommandSpaces.cmake
new file mode 100644
index 0000000..5bd4294
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandSpaces.cmake
@@ -0,0 +1,6 @@
+message("Example Message")
+message ("Example Message")
+message( "Example Message" )
+message( "Example Message")
+ message ( "Example Message")
+message ( Example " " Message )
diff --git a/Tests/RunCMake/Syntax/CommandTabs-stderr.txt b/Tests/RunCMake/Syntax/CommandTabs-stderr.txt
new file mode 100644
index 0000000..54a8b38
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandTabs-stderr.txt
@@ -0,0 +1,6 @@
+Example Message
+Example Message
+Example Message
+Example Message
+Example Message
+Example Message
diff --git a/Tests/RunCMake/Syntax/CommandTabs.cmake b/Tests/RunCMake/Syntax/CommandTabs.cmake
new file mode 100644
index 0000000..93876f8
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CommandTabs.cmake
@@ -0,0 +1,6 @@
+message("Example Message")
+message ("Example Message")
+message( "Example Message" )
+message( "Example Message")
+ message ( "Example Message")
+message ( Example " " Message )
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/Escape2-result.txt b/Tests/RunCMake/Syntax/Escape2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/Escape2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/Escape2-stderr.txt b/Tests/RunCMake/Syntax/Escape2-stderr.txt
new file mode 100644
index 0000000..cc3bdf0
--- /dev/null
+++ b/Tests/RunCMake/Syntax/Escape2-stderr.txt
@@ -0,0 +1,13 @@
+CMake Error at Escape2.cmake:4 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/Escape2.cmake:4
+
+ when parsing string
+
+ \\
+
+ Invalid character escape '\\' \(at end of input\).
+Call Stack \(most recent call first\):
+ Escape2.cmake:7 \(escape\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/Escape2.cmake b/Tests/RunCMake/Syntax/Escape2.cmake
new file mode 100644
index 0000000..078a822
--- /dev/null
+++ b/Tests/RunCMake/Syntax/Escape2.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0053 NEW)
+
+macro (escape str)
+ message("${str}")
+endmacro ()
+
+escape("\\")
diff --git a/Tests/RunCMake/Syntax/EscapeChar-char-result.txt b/Tests/RunCMake/Syntax/EscapeChar-char-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/EscapeChar-char-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/EscapeChar-char-stderr.txt.in b/Tests/RunCMake/Syntax/EscapeChar-char-stderr.txt.in
new file mode 100644
index 0000000..d1d908c
--- /dev/null
+++ b/Tests/RunCMake/Syntax/EscapeChar-char-stderr.txt.in
@@ -0,0 +1,12 @@
+CMake Error at EscapeChar-@char@-@testnum@.cmake:3 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/EscapeChar-@char@-@testnum@.cmake:3
+
+ when parsing string
+
+ -->\\@char@<--
+
+ Invalid character escape '\\@char@'.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/EscapeChar-char.cmake.in b/Tests/RunCMake/Syntax/EscapeChar-char.cmake.in
new file mode 100644
index 0000000..6f265e5
--- /dev/null
+++ b/Tests/RunCMake/Syntax/EscapeChar-char.cmake.in
@@ -0,0 +1,3 @@
+cmake_policy(SET CMP0053 NEW)
+
+message("-->\@char@<--")
diff --git a/Tests/RunCMake/Syntax/EscapeCharsAllowed-stderr.txt b/Tests/RunCMake/Syntax/EscapeCharsAllowed-stderr.txt
new file mode 100644
index 0000000..e658de7
--- /dev/null
+++ b/Tests/RunCMake/Syntax/EscapeCharsAllowed-stderr.txt
@@ -0,0 +1,12 @@
+^-->semicolon<--
+-->dollar<--
+-->brace<--
+-->bracket<--
+-->newline<--
+-->octothorpe<--
+-->splat<--
+-->caret<--
+-->paren<--
+-->dquote<--
+-->top-levelsemicolon<--
+-->top-level;escaped;semicolon<--$
diff --git a/Tests/RunCMake/Syntax/EscapeCharsAllowed.cmake b/Tests/RunCMake/Syntax/EscapeCharsAllowed.cmake
new file mode 100644
index 0000000..e9c568d
--- /dev/null
+++ b/Tests/RunCMake/Syntax/EscapeCharsAllowed.cmake
@@ -0,0 +1,26 @@
+cmake_policy(SET CMP0053 NEW)
+
+set("semicolon;in;name" semicolon)
+set("dollar$in$name" dollar)
+set("brace{in}name" brace)
+set("bracket[in]name" bracket)
+set("newline\nin\nname" newline)
+set("octothorpe\#in\#name" octothorpe)
+set("splat\@in\@name" splat)
+set("caret\^in\^name" caret)
+set("paren\(in\)name" paren)
+set("dquote\"in\"name" dquote)
+
+message("-->${semicolon\;in\;name}<--")
+message("-->${dollar\$in\$name}<--")
+message("-->${brace\{in\}name}<--")
+message("-->${bracket\[in\]name}<--")
+message("-->${newline\nin\nname}<--")
+message("-->${octothorpe\#in\#name}<--")
+message("-->${splat\@in\@name}<--")
+message("-->${caret\^in\^name}<--")
+message("-->${paren\(in\)name}<--")
+message("-->${dquote\"in\"name}<--")
+
+message(-->top-level;semicolon<--)
+message(-->top-level\;escaped\;semicolon<--)
diff --git a/Tests/RunCMake/Syntax/EscapeCharsDisallowed.cmake b/Tests/RunCMake/Syntax/EscapeCharsDisallowed.cmake
new file mode 100644
index 0000000..eef01a0
--- /dev/null
+++ b/Tests/RunCMake/Syntax/EscapeCharsDisallowed.cmake
@@ -0,0 +1,42 @@
+set(disallowed_chars
+ a b c d e f g h i j l m o p q s u v w x y z
+ A B C D E F G H I J L M N O P Q R S T U V W X Y Z
+ 0 1 2 3 4 5 6 6 7 8 9)
+set(testnum 0)
+
+configure_file(
+ "${RunCMake_SOURCE_DIR}/CMakeLists.txt"
+ "${RunCMake_BINARY_DIR}/CMakeLists.txt"
+ COPYONLY)
+
+foreach (char IN LISTS disallowed_chars)
+ configure_file(
+ "${RunCMake_SOURCE_DIR}/EscapeChar-char.cmake.in"
+ "${RunCMake_BINARY_DIR}/EscapeChar-${char}-${testnum}.cmake"
+ @ONLY)
+ configure_file(
+ "${RunCMake_SOURCE_DIR}/EscapeChar-char-stderr.txt.in"
+ "${RunCMake_BINARY_DIR}/EscapeChar-${char}-${testnum}-stderr.txt"
+ @ONLY)
+ configure_file(
+ "${RunCMake_SOURCE_DIR}/EscapeChar-char-result.txt"
+ "${RunCMake_BINARY_DIR}/EscapeChar-${char}-${testnum}-result.txt"
+ COPYONLY)
+
+ math(EXPR testnum "${testnum} + 1")
+endforeach ()
+
+function (run_tests)
+ set(GENERATED_RUNCMAKE_TESTS TRUE)
+ # Find the tests in the binary directory.
+ set(RunCMake_SOURCE_DIR "${RunCMake_BINARY_DIR}")
+
+ set(testnum 0)
+ foreach (char IN LISTS disallowed_chars)
+ run_cmake("EscapeChar-${char}-${testnum}")
+
+ math(EXPR testnum "${testnum} + 1")
+ endforeach ()
+endfunction ()
+
+run_tests()
diff --git a/Tests/RunCMake/Syntax/EscapeQuotes-stderr.txt b/Tests/RunCMake/Syntax/EscapeQuotes-stderr.txt
new file mode 100644
index 0000000..077272d
--- /dev/null
+++ b/Tests/RunCMake/Syntax/EscapeQuotes-stderr.txt
@@ -0,0 +1 @@
+-->"<--
diff --git a/Tests/RunCMake/Syntax/EscapeQuotes.cmake b/Tests/RunCMake/Syntax/EscapeQuotes.cmake
new file mode 100644
index 0000000..46d2b6f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/EscapeQuotes.cmake
@@ -0,0 +1,9 @@
+set(var "\"")
+set(ref "@var@")
+set(rref "\${var}")
+
+string(CONFIGURE "${ref}" output ESCAPE_QUOTES)
+message("-->${output}<--")
+
+string(CONFIGURE "${rref}" output ESCAPE_QUOTES)
+message("-->${output}<--")
diff --git a/Tests/RunCMake/Syntax/EscapedAt-stderr.txt b/Tests/RunCMake/Syntax/EscapedAt-stderr.txt
new file mode 100644
index 0000000..a51c0d3
--- /dev/null
+++ b/Tests/RunCMake/Syntax/EscapedAt-stderr.txt
@@ -0,0 +1 @@
+-->\\n<--
diff --git a/Tests/RunCMake/Syntax/EscapedAt.cmake b/Tests/RunCMake/Syntax/EscapedAt.cmake
new file mode 100644
index 0000000..1ced620
--- /dev/null
+++ b/Tests/RunCMake/Syntax/EscapedAt.cmake
@@ -0,0 +1,5 @@
+set(var "n")
+set(ref "\\@var@")
+
+string(CONFIGURE "${ref}" output)
+message("-->${output}<--")
diff --git a/Tests/RunCMake/Syntax/ExpandInAt-stderr.txt b/Tests/RunCMake/Syntax/ExpandInAt-stderr.txt
new file mode 100644
index 0000000..5da8b60
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ExpandInAt-stderr.txt
@@ -0,0 +1 @@
+-->@foo@<--
diff --git a/Tests/RunCMake/Syntax/ExpandInAt.cmake b/Tests/RunCMake/Syntax/ExpandInAt.cmake
new file mode 100644
index 0000000..98f0277
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ExpandInAt.cmake
@@ -0,0 +1,6 @@
+set("\${varname}" bar)
+set(var foo)
+set(ref "@\${var}@")
+
+string(CONFIGURE "${ref}" output)
+message("-->${output}<--")
diff --git a/Tests/RunCMake/Syntax/ForEachBracket1-stderr.txt b/Tests/RunCMake/Syntax/ForEachBracket1-stderr.txt
new file mode 100644
index 0000000..93c31cf
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ForEachBracket1-stderr.txt
@@ -0,0 +1,2 @@
+^\${x}:a
+\${x}:b$
diff --git a/Tests/RunCMake/Syntax/ForEachBracket1.cmake b/Tests/RunCMake/Syntax/ForEachBracket1.cmake
new file mode 100644
index 0000000..a55e21f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ForEachBracket1.cmake
@@ -0,0 +1,3 @@
+foreach(x a b)
+ message([[${x}:]] "${x}")
+endforeach()
diff --git a/Tests/RunCMake/Syntax/FunctionBracket1-stderr.txt b/Tests/RunCMake/Syntax/FunctionBracket1-stderr.txt
new file mode 100644
index 0000000..9ba6179
--- /dev/null
+++ b/Tests/RunCMake/Syntax/FunctionBracket1-stderr.txt
@@ -0,0 +1,2 @@
+^\${x},\${ARGN},\${ARGC},\${ARGV},\${ARGV0},\${ARGV1},\${ARGV2}:a,n,2,a;n,a,n,
+\${x},\${ARGN},\${ARGC},\${ARGV},\${ARGV0},\${ARGV1},\${ARGV2}:b,n,2,b;n,b,n,$
diff --git a/Tests/RunCMake/Syntax/FunctionBracket1.cmake b/Tests/RunCMake/Syntax/FunctionBracket1.cmake
new file mode 100644
index 0000000..8ed4f65
--- /dev/null
+++ b/Tests/RunCMake/Syntax/FunctionBracket1.cmake
@@ -0,0 +1,6 @@
+function(fun x)
+ message([[${x},${ARGN},${ARGC},${ARGV},${ARGV0},${ARGV1},${ARGV2}:]]
+ "${x},${ARGN},${ARGC},${ARGV},${ARGV0},${ARGV1},${ARGV2}")
+endfunction(fun)
+fun(a n)
+fun(b n)
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..306c255
--- /dev/null
+++ b/Tests/RunCMake/Syntax/FunctionUnmatched-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Error in FunctionUnmatched.cmake:
+ A logical block opening on the line
+
+ .*/Tests/RunCMake/Syntax/FunctionUnmatched.cmake:[0-9]+ \(function\)
+
+ is not closed.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
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/FunctionUnmatchedForeach-result.txt b/Tests/RunCMake/Syntax/FunctionUnmatchedForeach-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/FunctionUnmatchedForeach-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/FunctionUnmatchedForeach-stderr.txt b/Tests/RunCMake/Syntax/FunctionUnmatchedForeach-stderr.txt
new file mode 100644
index 0000000..f4ff709
--- /dev/null
+++ b/Tests/RunCMake/Syntax/FunctionUnmatchedForeach-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Error at FunctionUnmatchedForeach.cmake:[0-9]+ \(f\):
+ A logical block opening on the line
+
+ .*/Tests/RunCMake/Syntax/FunctionUnmatchedForeach.cmake:[0-9]+ \(foreach\)
+
+ is not closed.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/Syntax/FunctionUnmatchedForeach.cmake b/Tests/RunCMake/Syntax/FunctionUnmatchedForeach.cmake
new file mode 100644
index 0000000..ee9c184
--- /dev/null
+++ b/Tests/RunCMake/Syntax/FunctionUnmatchedForeach.cmake
@@ -0,0 +1,5 @@
+function(f)
+ foreach(i 1)
+ #endforeach() # missing
+endfunction()
+f()
diff --git a/Tests/RunCMake/Syntax/MacroBracket1-stderr.txt b/Tests/RunCMake/Syntax/MacroBracket1-stderr.txt
new file mode 100644
index 0000000..9ba6179
--- /dev/null
+++ b/Tests/RunCMake/Syntax/MacroBracket1-stderr.txt
@@ -0,0 +1,2 @@
+^\${x},\${ARGN},\${ARGC},\${ARGV},\${ARGV0},\${ARGV1},\${ARGV2}:a,n,2,a;n,a,n,
+\${x},\${ARGN},\${ARGC},\${ARGV},\${ARGV0},\${ARGV1},\${ARGV2}:b,n,2,b;n,b,n,$
diff --git a/Tests/RunCMake/Syntax/MacroBracket1.cmake b/Tests/RunCMake/Syntax/MacroBracket1.cmake
new file mode 100644
index 0000000..ef6de20
--- /dev/null
+++ b/Tests/RunCMake/Syntax/MacroBracket1.cmake
@@ -0,0 +1,6 @@
+macro(mac x)
+ message([[${x},${ARGN},${ARGC},${ARGV},${ARGV0},${ARGV1},${ARGV2}:]]
+ "${x},${ARGN},${ARGC},${ARGV},${ARGV0},${ARGV1},${ARGV2}")
+endmacro(mac)
+mac(a n)
+mac(b n)
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..440d863
--- /dev/null
+++ b/Tests/RunCMake/Syntax/MacroUnmatched-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Error in MacroUnmatched.cmake:
+ A logical block opening on the line
+
+ .*/Tests/RunCMake/Syntax/MacroUnmatched.cmake:[0-9]+ \(macro\)
+
+ is not closed.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
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/MacroUnmatchedForeach-result.txt b/Tests/RunCMake/Syntax/MacroUnmatchedForeach-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/MacroUnmatchedForeach-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/MacroUnmatchedForeach-stderr.txt b/Tests/RunCMake/Syntax/MacroUnmatchedForeach-stderr.txt
new file mode 100644
index 0000000..820cd2e
--- /dev/null
+++ b/Tests/RunCMake/Syntax/MacroUnmatchedForeach-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Error at MacroUnmatchedForeach.cmake:[0-9]+ \(m\):
+ A logical block opening on the line
+
+ .*/Tests/RunCMake/Syntax/MacroUnmatchedForeach.cmake:[0-9]+ \(foreach\)
+
+ is not closed.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/Syntax/MacroUnmatchedForeach.cmake b/Tests/RunCMake/Syntax/MacroUnmatchedForeach.cmake
new file mode 100644
index 0000000..be443dd
--- /dev/null
+++ b/Tests/RunCMake/Syntax/MacroUnmatchedForeach.cmake
@@ -0,0 +1,5 @@
+macro(m)
+ foreach(i 1)
+ #endforeach() # missing
+endmacro()
+m()
diff --git a/Tests/RunCMake/Syntax/NameWithCarriageReturn-result.txt b/Tests/RunCMake/Syntax/NameWithCarriageReturn-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithCarriageReturn-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/NameWithCarriageReturn-stderr.txt b/Tests/RunCMake/Syntax/NameWithCarriageReturn-stderr.txt
new file mode 100644
index 0000000..7448b59
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithCarriageReturn-stderr.txt
@@ -0,0 +1,12 @@
+^CMake Error at NameWithCarriageReturn.cmake:1 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/NameWithCarriageReturn.cmake:1
+
+ when parsing string
+
+ \${var\\rwith\\rcarriagereturn}
+
+ syntax error, unexpected cal_SYMBOL, expecting } \(7\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithCarriageReturn.cmake b/Tests/RunCMake/Syntax/NameWithCarriageReturn.cmake
new file mode 100644
index 0000000..614f554
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithCarriageReturn.cmake
@@ -0,0 +1 @@
+message(${var\rwith\rcarriagereturn})
diff --git a/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-result.txt b/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-stderr.txt b/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-stderr.txt
new file mode 100644
index 0000000..f5e03ed
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-stderr.txt
@@ -0,0 +1,12 @@
+^CMake Error at NameWithCarriageReturnQuoted.cmake:1 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted.cmake:1
+
+ when parsing string
+
+ \${var\\rwith\\rcarriagereturn}
+
+ syntax error, unexpected cal_SYMBOL, expecting } \(7\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted.cmake b/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted.cmake
new file mode 100644
index 0000000..bac69e4
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted.cmake
@@ -0,0 +1 @@
+message("${var\rwith\rcarriagereturn}")
diff --git a/Tests/RunCMake/Syntax/NameWithEscapedSpaces-result.txt b/Tests/RunCMake/Syntax/NameWithEscapedSpaces-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithEscapedSpaces-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/NameWithEscapedSpaces-stderr.txt b/Tests/RunCMake/Syntax/NameWithEscapedSpaces-stderr.txt
new file mode 100644
index 0000000..fa16a8a
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithEscapedSpaces-stderr.txt
@@ -0,0 +1,12 @@
+^CMake Error at NameWithEscapedSpaces.cmake:1 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/NameWithEscapedSpaces.cmake:1
+
+ when parsing string
+
+ \${var\\ with\\ escaped\\ space}
+
+ syntax error, unexpected cal_SYMBOL, expecting } \(7\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithEscapedSpaces.cmake b/Tests/RunCMake/Syntax/NameWithEscapedSpaces.cmake
new file mode 100644
index 0000000..6cb8401
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithEscapedSpaces.cmake
@@ -0,0 +1 @@
+message(${var\ with\ escaped\ space})
diff --git a/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-result.txt b/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-stderr.txt b/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-stderr.txt
new file mode 100644
index 0000000..07cbf24
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-stderr.txt
@@ -0,0 +1,12 @@
+^CMake Error at NameWithEscapedSpacesQuoted.cmake:1 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted.cmake:1
+
+ when parsing string
+
+ \${var\\ with\\ escaped\\ space}
+
+ syntax error, unexpected cal_SYMBOL, expecting } \(7\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted.cmake b/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted.cmake
new file mode 100644
index 0000000..2bd4bfd
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted.cmake
@@ -0,0 +1 @@
+message("${var\ with\ escaped\ space}")
diff --git a/Tests/RunCMake/Syntax/NameWithEscapedTabs-result.txt b/Tests/RunCMake/Syntax/NameWithEscapedTabs-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithEscapedTabs-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/NameWithEscapedTabs-stderr.txt b/Tests/RunCMake/Syntax/NameWithEscapedTabs-stderr.txt
new file mode 100644
index 0000000..d7fc38a
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithEscapedTabs-stderr.txt
@@ -0,0 +1,12 @@
+^CMake Error at NameWithEscapedTabs.cmake:1 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/NameWithEscapedTabs.cmake:1
+
+ when parsing string
+
+ \${var\\ with\\ escaped\\ tab}
+
+ Invalid escape sequence \\.?
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithEscapedTabs.cmake b/Tests/RunCMake/Syntax/NameWithEscapedTabs.cmake
new file mode 100644
index 0000000..c6faa7a
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithEscapedTabs.cmake
@@ -0,0 +1 @@
+message(${var\ with\ escaped\ tab})
diff --git a/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted-result.txt b/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted-stderr.txt b/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted-stderr.txt
new file mode 100644
index 0000000..915dbaa
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted-stderr.txt
@@ -0,0 +1,12 @@
+^CMake Error at NameWithEscapedTabsQuoted.cmake:1 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted.cmake:1
+
+ when parsing string
+
+ \${var\\ with\\ escaped\\ tab}
+
+ Invalid escape sequence \\.?
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted.cmake b/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted.cmake
new file mode 100644
index 0000000..d9be763
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted.cmake
@@ -0,0 +1 @@
+message("${var\ with\ escaped\ tab}")
diff --git a/Tests/RunCMake/Syntax/NameWithNewline-result.txt b/Tests/RunCMake/Syntax/NameWithNewline-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithNewline-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/NameWithNewline-stderr.txt b/Tests/RunCMake/Syntax/NameWithNewline-stderr.txt
new file mode 100644
index 0000000..5cc111b
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithNewline-stderr.txt
@@ -0,0 +1,12 @@
+^CMake Error at NameWithNewline.cmake:1 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/NameWithNewline.cmake:1
+
+ when parsing string
+
+ \${var\\nwith\\nnewline}
+
+ syntax error, unexpected cal_SYMBOL, expecting } \(7\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithNewline.cmake b/Tests/RunCMake/Syntax/NameWithNewline.cmake
new file mode 100644
index 0000000..583bcb0
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithNewline.cmake
@@ -0,0 +1 @@
+message(${var\nwith\nnewline})
diff --git a/Tests/RunCMake/Syntax/NameWithNewlineQuoted-result.txt b/Tests/RunCMake/Syntax/NameWithNewlineQuoted-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithNewlineQuoted-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/NameWithNewlineQuoted-stderr.txt b/Tests/RunCMake/Syntax/NameWithNewlineQuoted-stderr.txt
new file mode 100644
index 0000000..0067c2f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithNewlineQuoted-stderr.txt
@@ -0,0 +1,12 @@
+^CMake Error at NameWithNewlineQuoted.cmake:1 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/NameWithNewlineQuoted.cmake:1
+
+ when parsing string
+
+ \${var\\nwith\\nnewline}
+
+ syntax error, unexpected cal_SYMBOL, expecting } \(7\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithNewlineQuoted.cmake b/Tests/RunCMake/Syntax/NameWithNewlineQuoted.cmake
new file mode 100644
index 0000000..da6d2cf
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithNewlineQuoted.cmake
@@ -0,0 +1 @@
+message("${var\nwith\nnewline}")
diff --git a/Tests/RunCMake/Syntax/NameWithSpaces-result.txt b/Tests/RunCMake/Syntax/NameWithSpaces-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithSpaces-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/NameWithSpaces-stderr.txt b/Tests/RunCMake/Syntax/NameWithSpaces-stderr.txt
new file mode 100644
index 0000000..04bc226
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithSpaces-stderr.txt
@@ -0,0 +1,12 @@
+^CMake Error at NameWithSpaces.cmake:1 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/NameWithSpaces.cmake:1
+
+ when parsing string
+
+ \${var
+
+ syntax error, unexpected \$end, expecting } \(5\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithSpaces.cmake b/Tests/RunCMake/Syntax/NameWithSpaces.cmake
new file mode 100644
index 0000000..01febe9
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithSpaces.cmake
@@ -0,0 +1 @@
+message(${var with space})
diff --git a/Tests/RunCMake/Syntax/NameWithSpacesQuoted-result.txt b/Tests/RunCMake/Syntax/NameWithSpacesQuoted-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithSpacesQuoted-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/NameWithSpacesQuoted-stderr.txt b/Tests/RunCMake/Syntax/NameWithSpacesQuoted-stderr.txt
new file mode 100644
index 0000000..66cf9a2
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithSpacesQuoted-stderr.txt
@@ -0,0 +1,12 @@
+^CMake Error at NameWithSpacesQuoted.cmake:1 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/NameWithSpacesQuoted.cmake:1
+
+ when parsing string
+
+ \${var with space}
+
+ syntax error, unexpected cal_SYMBOL, expecting } \(17\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithSpacesQuoted.cmake b/Tests/RunCMake/Syntax/NameWithSpacesQuoted.cmake
new file mode 100644
index 0000000..3fba53f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithSpacesQuoted.cmake
@@ -0,0 +1 @@
+message("${var with space}")
diff --git a/Tests/RunCMake/Syntax/NameWithTabs-result.txt b/Tests/RunCMake/Syntax/NameWithTabs-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithTabs-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/NameWithTabs-stderr.txt b/Tests/RunCMake/Syntax/NameWithTabs-stderr.txt
new file mode 100644
index 0000000..e888096
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithTabs-stderr.txt
@@ -0,0 +1,12 @@
+^CMake Error at NameWithTabs.cmake:1 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/NameWithTabs.cmake:1
+
+ when parsing string
+
+ \${var
+
+ syntax error, unexpected \$end, expecting } \(5\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithTabs.cmake b/Tests/RunCMake/Syntax/NameWithTabs.cmake
new file mode 100644
index 0000000..c3b1bea
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithTabs.cmake
@@ -0,0 +1 @@
+message(${var with tab})
diff --git a/Tests/RunCMake/Syntax/NameWithTabsQuoted-result.txt b/Tests/RunCMake/Syntax/NameWithTabsQuoted-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithTabsQuoted-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/NameWithTabsQuoted-stderr.txt b/Tests/RunCMake/Syntax/NameWithTabsQuoted-stderr.txt
new file mode 100644
index 0000000..b020074
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithTabsQuoted-stderr.txt
@@ -0,0 +1,12 @@
+^CMake Error at NameWithTabsQuoted.cmake:1 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/NameWithTabsQuoted.cmake:1
+
+ when parsing string
+
+ \${var with tab}
+
+ syntax error, unexpected cal_SYMBOL, expecting } \(15\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithTabsQuoted.cmake b/Tests/RunCMake/Syntax/NameWithTabsQuoted.cmake
new file mode 100644
index 0000000..8ddb85d
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NameWithTabsQuoted.cmake
@@ -0,0 +1 @@
+message("${var with tab}")
diff --git a/Tests/RunCMake/Syntax/NullTerminatedArgument-result.txt b/Tests/RunCMake/Syntax/NullTerminatedArgument-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NullTerminatedArgument-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/NullTerminatedArgument-stderr.txt b/Tests/RunCMake/Syntax/NullTerminatedArgument-stderr.txt
new file mode 100644
index 0000000..f26754e
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NullTerminatedArgument-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at NullTerminatedArgument.cmake:1:
+ Parse error. Function missing ending "\)". Instead found bad character
+ with text "".
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/NullTerminatedArgument.cmake b/Tests/RunCMake/Syntax/NullTerminatedArgument.cmake
new file mode 100644
index 0000000..c82aceb
--- /dev/null
+++ b/Tests/RunCMake/Syntax/NullTerminatedArgument.cmake
Binary files differ
diff --git a/Tests/RunCMake/Syntax/OneLetter-stderr.txt b/Tests/RunCMake/Syntax/OneLetter-stderr.txt
new file mode 100644
index 0000000..87c01c7
--- /dev/null
+++ b/Tests/RunCMake/Syntax/OneLetter-stderr.txt
@@ -0,0 +1 @@
+message
diff --git a/Tests/RunCMake/Syntax/OneLetter.cmake b/Tests/RunCMake/Syntax/OneLetter.cmake
new file mode 100644
index 0000000..3c341fa
--- /dev/null
+++ b/Tests/RunCMake/Syntax/OneLetter.cmake
@@ -0,0 +1,7 @@
+function(f)
+ g(${ARGN})
+endfunction()
+macro(g)
+ message(${ARGN})
+endmacro()
+f(message)
diff --git a/Tests/RunCMake/Syntax/ParenInENV-result.txt b/Tests/RunCMake/Syntax/ParenInENV-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenInENV-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/ParenInENV-stderr.txt b/Tests/RunCMake/Syntax/ParenInENV-stderr.txt
new file mode 100644
index 0000000..d7861e2
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenInENV-stderr.txt
@@ -0,0 +1,20 @@
+CMake Warning \(dev\) at ParenInENV.cmake:2:
+ Syntax Warning in cmake code at column 21
+
+ Argument not separated from preceding token by whitespace.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Error at ParenInENV.cmake:2 \(message\):
+ Syntax error in cmake code at
+
+ .*Tests/RunCMake/Syntax/ParenInENV.cmake:2
+
+ when parsing string
+
+ -->\$ENV{e
+
+ syntax error, unexpected \$end, expecting } \(9\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/ParenInENV.cmake b/Tests/RunCMake/Syntax/ParenInENV.cmake
new file mode 100644
index 0000000..148f726
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenInENV.cmake
@@ -0,0 +1,2 @@
+set("ENV{e(x)}" value)
+message(-->$ENV{e(x)}<--)
diff --git a/Tests/RunCMake/Syntax/ParenInQuotedENV-stderr.txt b/Tests/RunCMake/Syntax/ParenInQuotedENV-stderr.txt
new file mode 100644
index 0000000..7020c7e
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenInQuotedENV-stderr.txt
@@ -0,0 +1 @@
+-->value<--
diff --git a/Tests/RunCMake/Syntax/ParenInQuotedENV.cmake b/Tests/RunCMake/Syntax/ParenInQuotedENV.cmake
new file mode 100644
index 0000000..6333717
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenInQuotedENV.cmake
@@ -0,0 +1,2 @@
+set("ENV{e(x)}" value)
+message("-->$ENV{e(x)}<--")
diff --git a/Tests/RunCMake/Syntax/ParenInVarName0-result.txt b/Tests/RunCMake/Syntax/ParenInVarName0-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenInVarName0-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/ParenInVarName0-stderr.txt b/Tests/RunCMake/Syntax/ParenInVarName0-stderr.txt
new file mode 100644
index 0000000..0a6b60f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenInVarName0-stderr.txt
@@ -0,0 +1,12 @@
+CMake Error at ParenInVarName0.cmake:4 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/ParenInVarName0.cmake:4
+
+ when parsing string
+
+ -->\${e\(x\)}<--
+
+ Invalid character \('\('\) in a variable name: 'e'
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/ParenInVarName0.cmake b/Tests/RunCMake/Syntax/ParenInVarName0.cmake
new file mode 100644
index 0000000..f863d20
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenInVarName0.cmake
@@ -0,0 +1,4 @@
+cmake_policy(SET CMP0053 NEW)
+
+set("e(x)" value)
+message("-->${e(x)}<--")
diff --git a/Tests/RunCMake/Syntax/ParenInVarName1-result.txt b/Tests/RunCMake/Syntax/ParenInVarName1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenInVarName1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/ParenInVarName1-stderr.txt b/Tests/RunCMake/Syntax/ParenInVarName1-stderr.txt
new file mode 100644
index 0000000..81b1717
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenInVarName1-stderr.txt
@@ -0,0 +1,12 @@
+CMake Error at ParenInVarName1.cmake:4 \(message\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/ParenInVarName1.cmake:4
+
+ when parsing string
+
+ -->\${e\(x\)}<--
+
+ syntax error, unexpected cal_SYMBOL, expecting } \(10\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/ParenInVarName1.cmake b/Tests/RunCMake/Syntax/ParenInVarName1.cmake
new file mode 100644
index 0000000..9fdc87b
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenInVarName1.cmake
@@ -0,0 +1,4 @@
+cmake_policy(SET CMP0053 OLD)
+
+set("{e(x)}" value)
+message("-->${e(x)}<--")
diff --git a/Tests/RunCMake/Syntax/ParenNoSpace0-stdout.txt b/Tests/RunCMake/Syntax/ParenNoSpace0-stdout.txt
new file mode 100644
index 0000000..5c4076f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenNoSpace0-stdout.txt
@@ -0,0 +1,3 @@
+-- \(unquoted\)
+-- \(quoted\)
+-- \(bracket\)
diff --git a/Tests/RunCMake/Syntax/ParenNoSpace0.cmake b/Tests/RunCMake/Syntax/ParenNoSpace0.cmake
new file mode 100644
index 0000000..175fe4a
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenNoSpace0.cmake
@@ -0,0 +1,3 @@
+message(STATUS (unquoted))
+message(STATUS ("quoted"))
+message(STATUS ([[bracket]]))
diff --git a/Tests/RunCMake/Syntax/ParenNoSpace1-result.txt b/Tests/RunCMake/Syntax/ParenNoSpace1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenNoSpace1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/ParenNoSpace1-stderr.txt b/Tests/RunCMake/Syntax/ParenNoSpace1-stderr.txt
new file mode 100644
index 0000000..7958249
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenNoSpace1-stderr.txt
@@ -0,0 +1,22 @@
+CMake Warning \(dev\) at ParenNoSpace1.cmake:1:
+ Syntax Warning in cmake code at column 26
+
+ Argument not separated from preceding token by whitespace.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Warning \(dev\) at ParenNoSpace1.cmake:2:
+ Syntax Warning in cmake code at column 26
+
+ Argument not separated from preceding token by whitespace.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Error at ParenNoSpace1.cmake:3:
+ Syntax Error in cmake code at column 29
+
+ Argument not separated from preceding token by whitespace.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/ParenNoSpace1.cmake b/Tests/RunCMake/Syntax/ParenNoSpace1.cmake
new file mode 100644
index 0000000..550339a
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenNoSpace1.cmake
@@ -0,0 +1,3 @@
+message(STATUS (unquoted)unquoted)
+message(STATUS ("quoted")"quoted")
+message(STATUS ([[bracket]])[[bracket]])
diff --git a/Tests/RunCMake/Syntax/ParenNoSpace2-stdout.txt b/Tests/RunCMake/Syntax/ParenNoSpace2-stdout.txt
new file mode 100644
index 0000000..0e657b9
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenNoSpace2-stdout.txt
@@ -0,0 +1,3 @@
+-- unquoted\(unquoted\)
+-- quoted\(quoted\)
+-- bracket\(bracket\)
diff --git a/Tests/RunCMake/Syntax/ParenNoSpace2.cmake b/Tests/RunCMake/Syntax/ParenNoSpace2.cmake
new file mode 100644
index 0000000..c46a887
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenNoSpace2.cmake
@@ -0,0 +1,3 @@
+message(STATUS unquoted(unquoted))
+message(STATUS "quoted"("quoted"))
+message(STATUS [[bracket]]([[bracket]]))
diff --git a/Tests/RunCMake/Syntax/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
new file mode 100644
index 0000000..628df91
--- /dev/null
+++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
@@ -0,0 +1,118 @@
+include(RunCMake)
+
+run_cmake(BOM-UTF-8)
+run_cmake(BOM-UTF-16-LE)
+run_cmake(BOM-UTF-16-BE)
+run_cmake(BOM-UTF-32-LE)
+run_cmake(BOM-UTF-32-BE)
+run_cmake(CMP0053-At-OLD)
+run_cmake(CMP0053-At-NEW)
+run_cmake(CMP0053-At-WARN)
+run_cmake(CMP0053-At-WARN-newlines)
+run_cmake(CMP0053-WARN)
+run_cmake(CMP0053-NUL)
+run_cmake(CMP0053-ParenInENV)
+run_cmake(CMP0053-ParenInQuotedENV)
+run_cmake(CommandSpaces)
+run_cmake(CommandTabs)
+run_cmake(CommandNewlines)
+run_cmake(CommandComments)
+run_cmake(CommandEOF)
+run_cmake(CommandError0)
+run_cmake(CommandError1)
+run_cmake(CommandError2)
+run_cmake(ForEachBracket1)
+run_cmake(FunctionBracket1)
+run_cmake(MacroBracket1)
+run_cmake(String0)
+run_cmake(String1)
+run_cmake(StringBackslash)
+run_cmake(StringCRLF)
+run_cmake(StringContinuation1)
+run_cmake(StringContinuation2)
+run_cmake(StringNoSpace)
+run_cmake(OneLetter)
+run_cmake(Unquoted0)
+run_cmake(Unquoted1)
+run_cmake(Unquoted2)
+run_cmake(Bracket0)
+run_cmake(Bracket1)
+run_cmake(Bracket2)
+run_cmake(BracketBackslash)
+run_cmake(BracketCRLF)
+run_cmake(BracketComment0)
+run_cmake(BracketComment1)
+run_cmake(BracketComment2)
+run_cmake(BracketComment3)
+run_cmake(BracketComment4)
+run_cmake(BracketComment5)
+run_cmake(BracketNoSpace0)
+run_cmake(BracketNoSpace1)
+run_cmake(BracketNoSpace2)
+run_cmake(BracketNoSpace3)
+run_cmake(BracketNoSpace4)
+run_cmake(BracketNoSpace5)
+run_cmake(Escape1)
+run_cmake(Escape2)
+run_cmake(EscapeCharsAllowed)
+run_cmake(NullTerminatedArgument)
+include("${RunCMake_SOURCE_DIR}/EscapeCharsDisallowed.cmake")
+run_cmake(ParenNoSpace0)
+run_cmake(ParenNoSpace1)
+run_cmake(ParenNoSpace2)
+run_cmake(ParenInVarName0)
+run_cmake(ParenInVarName1)
+run_cmake(UnterminatedCall1)
+run_cmake(UnterminatedCall2)
+run_cmake(UnterminatedString)
+run_cmake(UnterminatedBrace0)
+run_cmake(UnterminatedBrace1)
+run_cmake(UnterminatedBrace2)
+run_cmake(UnterminatedBracket0)
+run_cmake(UnterminatedBracket1)
+run_cmake(UnterminatedBracketComment)
+
+# Variable expansion tests
+run_cmake(ExpandInAt)
+run_cmake(EscapedAt)
+run_cmake(EscapeQuotes)
+run_cmake(AtWithVariable)
+run_cmake(AtWithVariableEmptyExpansion)
+run_cmake(AtWithVariableAtOnly)
+run_cmake(AtWithVariableEmptyExpansionAtOnly)
+run_cmake(AtWithVariableFile)
+run_cmake(AtWithVariableAtOnlyFile)
+run_cmake(ParenInENV)
+run_cmake(ParenInQuotedENV)
+
+# Variable name tests
+run_cmake(NameWithSpaces)
+run_cmake(NameWithTabs)
+run_cmake(NameWithNewline)
+run_cmake(NameWithCarriageReturn)
+run_cmake(NameWithEscapedSpaces)
+run_cmake(NameWithEscapedTabs)
+run_cmake(NameWithSpacesQuoted)
+run_cmake(NameWithTabsQuoted)
+run_cmake(NameWithNewlineQuoted)
+run_cmake(NameWithCarriageReturnQuoted)
+run_cmake(NameWithEscapedSpacesQuoted)
+run_cmake(NameWithEscapedTabsQuoted)
+run_cmake(CMP0053-NameWithSpaces)
+run_cmake(CMP0053-NameWithTabs)
+run_cmake(CMP0053-NameWithNewline)
+run_cmake(CMP0053-NameWithCarriageReturn)
+run_cmake(CMP0053-NameWithEscapedSpaces)
+run_cmake(CMP0053-NameWithEscapedTabs)
+run_cmake(CMP0053-NameWithSpacesQuoted)
+run_cmake(CMP0053-NameWithTabsQuoted)
+run_cmake(CMP0053-NameWithNewlineQuoted)
+run_cmake(CMP0053-NameWithCarriageReturnQuoted)
+run_cmake(CMP0053-NameWithEscapedSpacesQuoted)
+run_cmake(CMP0053-NameWithEscapedTabsQuoted)
+
+# Function and macro tests.
+run_cmake(FunctionUnmatched)
+run_cmake(FunctionUnmatchedForeach)
+run_cmake(MacroUnmatched)
+run_cmake(MacroUnmatchedForeach)
diff --git a/Tests/RunCMake/Syntax/String0-stderr.txt b/Tests/RunCMake/Syntax/String0-stderr.txt
new file mode 100644
index 0000000..8eea069
--- /dev/null
+++ b/Tests/RunCMake/Syntax/String0-stderr.txt
@@ -0,0 +1 @@
+^1 2;3 4$
diff --git a/Tests/RunCMake/Syntax/String0.cmake b/Tests/RunCMake/Syntax/String0.cmake
new file mode 100644
index 0000000..95281d7
--- /dev/null
+++ b/Tests/RunCMake/Syntax/String0.cmake
@@ -0,0 +1,2 @@
+set(var 2 3)
+message("1 ${var} 4")
diff --git a/Tests/RunCMake/Syntax/String1-stderr.txt b/Tests/RunCMake/Syntax/String1-stderr.txt
new file mode 100644
index 0000000..07e98da
--- /dev/null
+++ b/Tests/RunCMake/Syntax/String1-stderr.txt
@@ -0,0 +1,3 @@
+^
+ 1 \${var} 4
+ $
diff --git a/Tests/RunCMake/Syntax/String1.cmake b/Tests/RunCMake/Syntax/String1.cmake
new file mode 100644
index 0000000..a94c9ff
--- /dev/null
+++ b/Tests/RunCMake/Syntax/String1.cmake
@@ -0,0 +1,3 @@
+message("
+ 1 \${var} 4
+ ")
diff --git a/Tests/RunCMake/Syntax/StringBackslash-result.txt b/Tests/RunCMake/Syntax/StringBackslash-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/StringBackslash-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/StringBackslash-stderr.txt b/Tests/RunCMake/Syntax/StringBackslash-stderr.txt
new file mode 100644
index 0000000..214f914
--- /dev/null
+++ b/Tests/RunCMake/Syntax/StringBackslash-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at StringBackslash.cmake:1 \(message\):
+ a\\
+
+ b
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/StringBackslash.cmake b/Tests/RunCMake/Syntax/StringBackslash.cmake
new file mode 100644
index 0000000..066be96
--- /dev/null
+++ b/Tests/RunCMake/Syntax/StringBackslash.cmake
@@ -0,0 +1,2 @@
+message(FATAL_ERROR "a\\
+b")
diff --git a/Tests/RunCMake/Syntax/StringCRLF-stderr.txt b/Tests/RunCMake/Syntax/StringCRLF-stderr.txt
new file mode 100644
index 0000000..7aef26e
--- /dev/null
+++ b/Tests/RunCMake/Syntax/StringCRLF-stderr.txt
@@ -0,0 +1 @@
+CRLF->LF worked
diff --git a/Tests/RunCMake/Syntax/StringCRLF.cmake b/Tests/RunCMake/Syntax/StringCRLF.cmake
new file mode 100644
index 0000000..14aad31
--- /dev/null
+++ b/Tests/RunCMake/Syntax/StringCRLF.cmake
@@ -0,0 +1,6 @@
+if("a
+b" STREQUAL "a\nb")
+ message("CRLF->LF worked")
+else()
+ message(FATAL_ERROR "CRLF->LF failed")
+endif()
diff --git a/Tests/RunCMake/Syntax/StringContinuation1-result.txt b/Tests/RunCMake/Syntax/StringContinuation1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/StringContinuation1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/StringContinuation1-stderr.txt b/Tests/RunCMake/Syntax/StringContinuation1-stderr.txt
new file mode 100644
index 0000000..05771da
--- /dev/null
+++ b/Tests/RunCMake/Syntax/StringContinuation1-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at StringContinuation1.cmake:1 \(message\):
+ ab
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/StringContinuation1.cmake b/Tests/RunCMake/Syntax/StringContinuation1.cmake
new file mode 100644
index 0000000..ae86bb2
--- /dev/null
+++ b/Tests/RunCMake/Syntax/StringContinuation1.cmake
@@ -0,0 +1,2 @@
+message(FATAL_ERROR "a\
+b")
diff --git a/Tests/RunCMake/Syntax/StringContinuation2-result.txt b/Tests/RunCMake/Syntax/StringContinuation2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/StringContinuation2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/StringContinuation2-stderr.txt b/Tests/RunCMake/Syntax/StringContinuation2-stderr.txt
new file mode 100644
index 0000000..2f4964c
--- /dev/null
+++ b/Tests/RunCMake/Syntax/StringContinuation2-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at StringContinuation2.cmake:1 \(message\):
+ a\\b
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/StringContinuation2.cmake b/Tests/RunCMake/Syntax/StringContinuation2.cmake
new file mode 100644
index 0000000..490a408
--- /dev/null
+++ b/Tests/RunCMake/Syntax/StringContinuation2.cmake
@@ -0,0 +1,2 @@
+message(FATAL_ERROR "a\\\
+b")
diff --git a/Tests/RunCMake/Syntax/StringNoSpace-stderr.txt b/Tests/RunCMake/Syntax/StringNoSpace-stderr.txt
new file mode 100644
index 0000000..817fcfa
--- /dev/null
+++ b/Tests/RunCMake/Syntax/StringNoSpace-stderr.txt
@@ -0,0 +1,19 @@
+CMake Warning \(dev\) at StringNoSpace.cmake:2:
+ Syntax Warning in cmake code at column 28
+
+ Argument not separated from preceding token by whitespace.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Warning \(dev\) at StringNoSpace.cmake:2:
+ Syntax Warning in cmake code at column 31
+
+ Argument not separated from preceding token by whitespace.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+\[1 \${var} \\n 4\]
+\[x\]
+\[y\]$
diff --git a/Tests/RunCMake/Syntax/StringNoSpace.cmake b/Tests/RunCMake/Syntax/StringNoSpace.cmake
new file mode 100644
index 0000000..76f22db
--- /dev/null
+++ b/Tests/RunCMake/Syntax/StringNoSpace.cmake
@@ -0,0 +1,4 @@
+# Quoted arguments may be immediately followed by another argument.
+foreach(x "1 \${var} \\n 4""x"y)
+ message("[${x}]")
+endforeach()
diff --git a/Tests/RunCMake/Syntax/Unquoted0-stderr.txt b/Tests/RunCMake/Syntax/Unquoted0-stderr.txt
new file mode 100644
index 0000000..ea68ebf
--- /dev/null
+++ b/Tests/RunCMake/Syntax/Unquoted0-stderr.txt
@@ -0,0 +1 @@
+^1234$
diff --git a/Tests/RunCMake/Syntax/Unquoted0.cmake b/Tests/RunCMake/Syntax/Unquoted0.cmake
new file mode 100644
index 0000000..c5314c9
--- /dev/null
+++ b/Tests/RunCMake/Syntax/Unquoted0.cmake
@@ -0,0 +1,2 @@
+set(var 2 3)
+message(1 ${var} 4)
diff --git a/Tests/RunCMake/Syntax/Unquoted1-stderr.txt b/Tests/RunCMake/Syntax/Unquoted1-stderr.txt
new file mode 100644
index 0000000..85a7a9d
--- /dev/null
+++ b/Tests/RunCMake/Syntax/Unquoted1-stderr.txt
@@ -0,0 +1 @@
+^\[\]\[=\]\[\$\$\(MV\)-DSTR=" \[="\[;\]\]\[$
diff --git a/Tests/RunCMake/Syntax/Unquoted1.cmake b/Tests/RunCMake/Syntax/Unquoted1.cmake
new file mode 100644
index 0000000..515161f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/Unquoted1.cmake
@@ -0,0 +1 @@
+message([] [=] [$ $(MV) -DSTR=" [=" [;] ] [)
diff --git a/Tests/RunCMake/Syntax/Unquoted2-stderr.txt b/Tests/RunCMake/Syntax/Unquoted2-stderr.txt
new file mode 100644
index 0000000..eb8883e
--- /dev/null
+++ b/Tests/RunCMake/Syntax/Unquoted2-stderr.txt
@@ -0,0 +1 @@
+^\[\[UnquotedBracketArgument1\]\]$
diff --git a/Tests/RunCMake/Syntax/Unquoted2.cmake b/Tests/RunCMake/Syntax/Unquoted2.cmake
new file mode 100644
index 0000000..d94057d
--- /dev/null
+++ b/Tests/RunCMake/Syntax/Unquoted2.cmake
@@ -0,0 +1,3 @@
+cmake_policy(SET CMP0053 NEW)
+
+message(\[[Unquoted Bracket Argument 1]])
diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace0-result.txt b/Tests/RunCMake/Syntax/UnterminatedBrace0-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedBrace0-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt
new file mode 100644
index 0000000..1e0ce49
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt
@@ -0,0 +1,12 @@
+CMake Error at UnterminatedBrace0.cmake:2 \(set\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake:2
+
+ when parsing string
+
+ \${
+
+ syntax error, unexpected \$end, expecting } \(2\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake b/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake
new file mode 100644
index 0000000..0da1290
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake
@@ -0,0 +1,2 @@
+cmake_minimum_required(VERSION 3.0)
+set(var "${")
diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt
new file mode 100644
index 0000000..4e3c2b5
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt
@@ -0,0 +1,13 @@
+CMake Warning \(dev\) at UnterminatedBrace1.cmake:3 \(set\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake:3
+
+ when parsing string
+
+ \${
+
+ syntax error, unexpected \$end, expecting } \(2\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake b/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake
new file mode 100644
index 0000000..93fba34
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.0)
+cmake_policy(SET CMP0010 OLD)
+set(var "${")
diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace2-result.txt b/Tests/RunCMake/Syntax/UnterminatedBrace2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedBrace2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt
new file mode 100644
index 0000000..b332d34
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt
@@ -0,0 +1,12 @@
+CMake Error at UnterminatedBrace2.cmake:4 \(set\):
+ Syntax error in cmake code at
+
+ .*/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake:4
+
+ when parsing string
+
+ \${
+
+ There is an unterminated variable reference.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake b/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake
new file mode 100644
index 0000000..a650e5b
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake
@@ -0,0 +1,4 @@
+cmake_minimum_required(VERSION 3.0)
+cmake_policy(SET CMP0010 OLD)
+cmake_policy(SET CMP0053 NEW)
+set(var "${")
diff --git a/Tests/RunCMake/Syntax/UnterminatedBracket0-result.txt b/Tests/RunCMake/Syntax/UnterminatedBracket0-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedBracket0-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/UnterminatedBracket0-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBracket0-stderr.txt
new file mode 100644
index 0000000..de33f7d
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedBracket0-stderr.txt
@@ -0,0 +1,7 @@
+CMake Error at UnterminatedBracket0.cmake:2:
+ Parse error. Function missing ending "\)". Instead found unterminated
+ bracket with text "\)
+
+ ".
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/UnterminatedBracket0.cmake b/Tests/RunCMake/Syntax/UnterminatedBracket0.cmake
new file mode 100644
index 0000000..98cd906
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedBracket0.cmake
@@ -0,0 +1 @@
+set(var [[)
diff --git a/Tests/RunCMake/Syntax/UnterminatedBracket1-result.txt b/Tests/RunCMake/Syntax/UnterminatedBracket1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedBracket1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/UnterminatedBracket1-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBracket1-stderr.txt
new file mode 100644
index 0000000..86bfa2a
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedBracket1-stderr.txt
@@ -0,0 +1,7 @@
+CMake Error at UnterminatedBracket1.cmake:2:
+ Parse error. Function missing ending "\)". Instead found unterminated
+ bracket with text "]]\)
+
+ ".
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/UnterminatedBracket1.cmake b/Tests/RunCMake/Syntax/UnterminatedBracket1.cmake
new file mode 100644
index 0000000..706f7a3
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedBracket1.cmake
@@ -0,0 +1 @@
+set(var [=[]])
diff --git a/Tests/RunCMake/Syntax/UnterminatedBracketComment-result.txt b/Tests/RunCMake/Syntax/UnterminatedBracketComment-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedBracketComment-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/UnterminatedBracketComment-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBracketComment-stderr.txt
new file mode 100644
index 0000000..4ec78a1
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedBracketComment-stderr.txt
@@ -0,0 +1,7 @@
+CMake Error at UnterminatedBracketComment.cmake:3:
+ Parse error. Expected a command name, got unterminated bracket with text
+ "#]]
+
+ ".
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/UnterminatedBracketComment.cmake b/Tests/RunCMake/Syntax/UnterminatedBracketComment.cmake
new file mode 100644
index 0000000..ad71f3c
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedBracketComment.cmake
@@ -0,0 +1,2 @@
+#[=[
+#]]
diff --git a/Tests/RunCMake/Syntax/UnterminatedCall1-result.txt b/Tests/RunCMake/Syntax/UnterminatedCall1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedCall1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/UnterminatedCall1-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedCall1-stderr.txt
new file mode 100644
index 0000000..3f52244
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedCall1-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at UnterminatedCall1.cmake:2:
+ Parse error. Function missing ending "\)". End of file reached.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/UnterminatedCall1.cmake b/Tests/RunCMake/Syntax/UnterminatedCall1.cmake
new file mode 100644
index 0000000..1166109
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedCall1.cmake
@@ -0,0 +1 @@
+message(
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..18656f7
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedCall2-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at UnterminatedCall2.cmake:4:
+ Parse error. Function missing ending "\)". End of file reached.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
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(
diff --git a/Tests/RunCMake/Syntax/UnterminatedString-result.txt b/Tests/RunCMake/Syntax/UnterminatedString-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedString-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/UnterminatedString-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedString-stderr.txt
new file mode 100644
index 0000000..79c3fd2
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedString-stderr.txt
@@ -0,0 +1,7 @@
+CMake Error at UnterminatedString.cmake:2:
+ Parse error. Function missing ending "\)". Instead found unterminated
+ string with text "\)
+
+ ".
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/UnterminatedString.cmake b/Tests/RunCMake/Syntax/UnterminatedString.cmake
new file mode 100644
index 0000000..721ae75
--- /dev/null
+++ b/Tests/RunCMake/Syntax/UnterminatedString.cmake
@@ -0,0 +1 @@
+set(var ")
diff --git a/Tests/RunCMake/Syntax/atfile.txt.in b/Tests/RunCMake/Syntax/atfile.txt.in
new file mode 100644
index 0000000..3775919
--- /dev/null
+++ b/Tests/RunCMake/Syntax/atfile.txt.in
@@ -0,0 +1,4 @@
+==>@var@<==
+==>@empty@<==
+==>${var}<==
+==>${empty}<==