EVIS: Add tests for syntax corner cases and CMP0053
Include tests for: - @ expansion during normal execution - various characters in variable names for comparison between the new and the old parser - corner cases in the parsers - correct messages when behavior is different
This commit is contained in:
parent
bc38565863
commit
411f77d14f
|
@ -0,0 +1 @@
|
|||
^-->\${right}<--$
|
|
@ -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}<--")
|
|
@ -0,0 +1 @@
|
|||
^-->wrong<--$
|
|
@ -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}<--")
|
|
@ -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.$
|
|
@ -0,0 +1,6 @@
|
|||
set(right "wrong")
|
||||
set(var "\${right}")
|
||||
# Expanded here with the old policy.
|
||||
set(ref "
|
||||
@var@
|
||||
")
|
|
@ -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.$
|
|
@ -0,0 +1,4 @@
|
|||
set(right "wrong")
|
||||
set(var "\${right}")
|
||||
# Expanded here with the old policy.
|
||||
set(ref "@var@")
|
|
@ -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.
|
||||
|
||||
--><--
|
||||
--><--
|
||||
--><--
|
||||
--><--$
|
|
@ -0,0 +1,6 @@
|
|||
set(qnul "\0")
|
||||
set(nul \0)
|
||||
message(-->${nul}<--)
|
||||
message(-->${qnul}<--)
|
||||
message("-->${nul}<--")
|
||||
message("-->${qnul}<--")
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)$
|
|
@ -0,0 +1,2 @@
|
|||
cmake_policy(SET CMP0053 NEW)
|
||||
message(${var\rwith\rcarriagereturn})
|
|
@ -0,0 +1,2 @@
|
|||
cmake_policy(SET CMP0053 NEW)
|
||||
message("${var\rwith\rcarriagereturn}")
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)
|
|
@ -0,0 +1,2 @@
|
|||
cmake_policy(SET CMP0053 NEW)
|
||||
message(${var\ with\ escaped\ space})
|
|
@ -0,0 +1,2 @@
|
|||
cmake_policy(SET CMP0053 NEW)
|
||||
message("${var\ with\ escaped\ space}")
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)
|
|
@ -0,0 +1,2 @@
|
|||
cmake_policy(SET CMP0053 NEW)
|
||||
message(${var\ with\ escaped\ tab})
|
|
@ -0,0 +1,2 @@
|
|||
cmake_policy(SET CMP0053 NEW)
|
||||
message("${var\ with\ escaped\ tab}")
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)$
|
|
@ -0,0 +1,2 @@
|
|||
cmake_policy(SET CMP0053 NEW)
|
||||
message(${var\nwith\nnewline})
|
|
@ -0,0 +1,2 @@
|
|||
cmake_policy(SET CMP0053 NEW)
|
||||
message("${var\nwith\nnewline}")
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)$
|
|
@ -0,0 +1,2 @@
|
|||
cmake_policy(SET CMP0053 NEW)
|
||||
message(${var with space})
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)$
|
|
@ -0,0 +1,2 @@
|
|||
cmake_policy(SET CMP0053 NEW)
|
||||
message("${var with space}")
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)$
|
|
@ -0,0 +1,2 @@
|
|||
cmake_policy(SET CMP0053 NEW)
|
||||
message(${var with tab})
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)$
|
|
@ -0,0 +1,2 @@
|
|||
cmake_policy(SET CMP0053 NEW)
|
||||
message("${var with tab}")
|
|
@ -0,0 +1 @@
|
|||
-->value<--
|
|
@ -0,0 +1,3 @@
|
|||
cmake_policy(SET CMP0053 NEW)
|
||||
set("ENV{e(x)}" value)
|
||||
message(-->$ENV{e\(x\)}<--)
|
|
@ -0,0 +1 @@
|
|||
-->value<--
|
|
@ -0,0 +1,3 @@
|
|||
cmake_policy(SET CMP0053 NEW)
|
||||
set("ENV{e(x)}" value)
|
||||
message("-->$ENV{e\(x\)}<--")
|
|
@ -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.
|
||||
|
||||
\\$
|
|
@ -0,0 +1,5 @@
|
|||
macro (escape str)
|
||||
message("${str}")
|
||||
endmacro ()
|
||||
|
||||
escape("\\")
|
|
@ -1,3 +1,3 @@
|
|||
cmake_minimum_required(VERSION 2.8.9)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)
|
|
@ -0,0 +1,7 @@
|
|||
cmake_policy(SET CMP0053 NEW)
|
||||
|
||||
macro (escape str)
|
||||
message("${str}")
|
||||
endmacro ()
|
||||
|
||||
escape("\\")
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)
|
|
@ -0,0 +1,3 @@
|
|||
cmake_policy(SET CMP0053 NEW)
|
||||
|
||||
message("-->\@char@<--")
|
|
@ -0,0 +1,12 @@
|
|||
^-->semicolon<--
|
||||
-->dollar<--
|
||||
-->brace<--
|
||||
-->bracket<--
|
||||
-->newline<--
|
||||
-->octothorpe<--
|
||||
-->splat<--
|
||||
-->caret<--
|
||||
-->paren<--
|
||||
-->dquote<--
|
||||
-->top-levelsemicolon<--
|
||||
-->top-level;escaped;semicolon<--$
|
|
@ -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<--)
|
|
@ -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()
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)$
|
|
@ -0,0 +1 @@
|
|||
message(${var\rwith\rcarriagereturn})
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)$
|
|
@ -0,0 +1 @@
|
|||
message("${var\rwith\rcarriagereturn}")
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)$
|
|
@ -0,0 +1 @@
|
|||
message(${var\ with\ escaped\ space})
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)$
|
|
@ -0,0 +1 @@
|
|||
message("${var\ with\ escaped\ space}")
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)$
|
|
@ -0,0 +1 @@
|
|||
message(${var\ with\ escaped\ tab})
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)$
|
|
@ -0,0 +1 @@
|
|||
message("${var\ with\ escaped\ tab}")
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)$
|
|
@ -0,0 +1 @@
|
|||
message(${var\nwith\nnewline})
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)$
|
|
@ -0,0 +1 @@
|
|||
message("${var\nwith\nnewline}")
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)$
|
|
@ -0,0 +1 @@
|
|||
message(${var with space})
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)$
|
|
@ -0,0 +1 @@
|
|||
message("${var with space}")
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)$
|
|
@ -0,0 +1 @@
|
|||
message(${var with tab})
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)$
|
|
@ -0,0 +1 @@
|
|||
message("${var with tab}")
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)
|
|
@ -0,0 +1,4 @@
|
|||
cmake_policy(SET CMP0053 NEW)
|
||||
|
||||
set("e(x)" value)
|
||||
message("-->${e(x)}<--")
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -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\)
|
|
@ -0,0 +1,4 @@
|
|||
cmake_policy(SET CMP0053 OLD)
|
||||
|
||||
set("{e(x)}" value)
|
||||
message("-->${e(x)}<--")
|
|
@ -5,6 +5,14 @@ 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)
|
||||
|
@ -25,6 +33,7 @@ run_cmake(StringNoSpace)
|
|||
run_cmake(OneLetter)
|
||||
run_cmake(Unquoted0)
|
||||
run_cmake(Unquoted1)
|
||||
run_cmake(Unquoted2)
|
||||
run_cmake(Bracket0)
|
||||
run_cmake(Bracket1)
|
||||
run_cmake(Bracket2)
|
||||
|
@ -43,12 +52,20 @@ run_cmake(BracketNoSpace3)
|
|||
run_cmake(BracketNoSpace4)
|
||||
run_cmake(BracketNoSpace5)
|
||||
run_cmake(Escape1)
|
||||
run_cmake(Escape2)
|
||||
run_cmake(EscapeCharsAllowed)
|
||||
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)
|
||||
|
@ -65,3 +82,29 @@ 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)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
^\[\[UnquotedBracketArgument1\]\]$
|
|
@ -0,0 +1,3 @@
|
|||
cmake_policy(SET CMP0053 NEW)
|
||||
|
||||
message(\[[Unquoted Bracket Argument 1]])
|
|
@ -0,0 +1 @@
|
|||
1
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue