summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Syntax
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-08-18 14:18:20 (GMT)
committerBrad King <brad.king@kitware.com>2014-08-18 14:18:20 (GMT)
commit02b3cba9df973026487ed9739ff6ca1825814ad1 (patch)
tree2f647cdd9a7a9c6be13fe4864bd8084c96a1a5a3 /Tests/RunCMake/Syntax
parent55d6aa36a522f2dd7849ccd53d9e743a88f8c7a1 (diff)
downloadCMake-02b3cba9df973026487ed9739ff6ca1825814ad1.zip
CMake-02b3cba9df973026487ed9739ff6ca1825814ad1.tar.gz
CMake-02b3cba9df973026487ed9739ff6ca1825814ad1.tar.bz2
cmListFileLexer: Fix lexing of single '[' character (#15092)
The lexer changes in commit v3.0.0-rc1~495^2 (Add Lua-style long brackets and long comments to CMake language, 2013-08-06) accidentally left out matching '[' as a single character in an unquoted argument. Add a lexer rule to match it and extend the RunCMake.Syntax test to cover this case.
Diffstat (limited to 'Tests/RunCMake/Syntax')
-rw-r--r--Tests/RunCMake/Syntax/Unquoted1-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/Unquoted1.cmake2
2 files changed, 2 insertions, 2 deletions
diff --git a/Tests/RunCMake/Syntax/Unquoted1-stderr.txt b/Tests/RunCMake/Syntax/Unquoted1-stderr.txt
index ff8194a..85a7a9d 100644
--- a/Tests/RunCMake/Syntax/Unquoted1-stderr.txt
+++ b/Tests/RunCMake/Syntax/Unquoted1-stderr.txt
@@ -1 +1 @@
-^\[\]\[=\]\[\$\$\(MV\)-DSTR=" \[="\[;\]$
+^\[\]\[=\]\[\$\$\(MV\)-DSTR=" \[="\[;\]\]\[$
diff --git a/Tests/RunCMake/Syntax/Unquoted1.cmake b/Tests/RunCMake/Syntax/Unquoted1.cmake
index 0344fbd..515161f 100644
--- a/Tests/RunCMake/Syntax/Unquoted1.cmake
+++ b/Tests/RunCMake/Syntax/Unquoted1.cmake
@@ -1 +1 @@
-message([] [=] [$ $(MV) -DSTR=" [=" [;])
+message([] [=] [$ $(MV) -DSTR=" [=" [;] ] [)