diff options
Diffstat (limited to 'Tests/RunCMake')
4 files changed, 15 insertions, 3 deletions
diff --git a/Tests/RunCMake/math/MATH-InvalidExpression-stderr.txt b/Tests/RunCMake/math/MATH-InvalidExpression-stderr.txt index 18ac9f7..9e73ed5 100644 --- a/Tests/RunCMake/math/MATH-InvalidExpression-stderr.txt +++ b/Tests/RunCMake/math/MATH-InvalidExpression-stderr.txt @@ -1,6 +1,5 @@ ^CMake Error at MATH-InvalidExpression.cmake:1 \(math\): - *math cannot parse the expression: "INVALID": syntax error, unexpected - *character, expecting exp_PLUS or exp_MINUS or exp_OPENPARENT or exp_NUMBER - *\(1\). + math cannot parse the expression: "INVALID": syntax error, unexpected \$end, + expecting exp_PLUS or exp_MINUS or exp_OPENPARENT or exp_NUMBER \(7\). Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/math/MATH-ToleratedExpression-stderr.txt b/Tests/RunCMake/math/MATH-ToleratedExpression-stderr.txt new file mode 100644 index 0000000..732ce6f --- /dev/null +++ b/Tests/RunCMake/math/MATH-ToleratedExpression-stderr.txt @@ -0,0 +1,8 @@ +^CMake Warning \(dev\) at MATH-ToleratedExpression.cmake:1 \(math\): + Unexpected character in expression at position 1: ' + + Unexpected character in expression at position 7: ' + +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/math/MATH-ToleratedExpression.cmake b/Tests/RunCMake/math/MATH-ToleratedExpression.cmake new file mode 100644 index 0000000..d1be218 --- /dev/null +++ b/Tests/RunCMake/math/MATH-ToleratedExpression.cmake @@ -0,0 +1,4 @@ +math(EXPR var "'2*1-1'") +if(NOT var EQUAL 1) + message(FATAL_ERROR "Expression did not evaluate to 1") +endif() diff --git a/Tests/RunCMake/math/RunCMakeTest.cmake b/Tests/RunCMake/math/RunCMakeTest.cmake index 494b813..a4d5c31 100644 --- a/Tests/RunCMake/math/RunCMakeTest.cmake +++ b/Tests/RunCMake/math/RunCMakeTest.cmake @@ -5,4 +5,5 @@ run_cmake(MATH-WrongArgument) run_cmake(MATH-DoubleOption) run_cmake(MATH-TooManyArguments) run_cmake(MATH-InvalidExpression) +run_cmake(MATH-ToleratedExpression) run_cmake(MATH-DivideByZero) |