浏览代码

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
Ben Boeckel 11 年之前
父节点
当前提交
411f77d14f
共有 100 个文件被更改,包括 645 次插入1 次删除
  1. 1 0
      Tests/RunCMake/Syntax/CMP0053-At-NEW-stderr.txt
  2. 9 0
      Tests/RunCMake/Syntax/CMP0053-At-NEW.cmake
  3. 1 0
      Tests/RunCMake/Syntax/CMP0053-At-OLD-stderr.txt
  4. 9 0
      Tests/RunCMake/Syntax/CMP0053-At-OLD.cmake
  5. 27 0
      Tests/RunCMake/Syntax/CMP0053-At-WARN-newlines-stderr.txt
  6. 6 0
      Tests/RunCMake/Syntax/CMP0053-At-WARN-newlines.cmake
  7. 21 0
      Tests/RunCMake/Syntax/CMP0053-At-WARN-stderr.txt
  8. 4 0
      Tests/RunCMake/Syntax/CMP0053-At-WARN.cmake
  9. 56 0
      Tests/RunCMake/Syntax/CMP0053-NUL-stderr.txt
  10. 6 0
      Tests/RunCMake/Syntax/CMP0053-NUL.cmake
  11. 1 0
      Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn-result.txt
  12. 4 0
      Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn-stderr.txt
  13. 2 0
      Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn.cmake
  14. 2 0
      Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturnQuoted.cmake
  15. 1 0
      Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces-result.txt
  16. 4 0
      Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces-stderr.txt
  17. 2 0
      Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces.cmake
  18. 2 0
      Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpacesQuoted.cmake
  19. 1 0
      Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs-result.txt
  20. 4 0
      Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs-stderr.txt
  21. 2 0
      Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs.cmake
  22. 2 0
      Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabsQuoted.cmake
  23. 1 0
      Tests/RunCMake/Syntax/CMP0053-NameWithNewline-result.txt
  24. 4 0
      Tests/RunCMake/Syntax/CMP0053-NameWithNewline-stderr.txt
  25. 2 0
      Tests/RunCMake/Syntax/CMP0053-NameWithNewline.cmake
  26. 2 0
      Tests/RunCMake/Syntax/CMP0053-NameWithNewlineQuoted.cmake
  27. 1 0
      Tests/RunCMake/Syntax/CMP0053-NameWithSpaces-result.txt
  28. 12 0
      Tests/RunCMake/Syntax/CMP0053-NameWithSpaces-stderr.txt
  29. 2 0
      Tests/RunCMake/Syntax/CMP0053-NameWithSpaces.cmake
  30. 1 0
      Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted-result.txt
  31. 12 0
      Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted-stderr.txt
  32. 2 0
      Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted.cmake
  33. 1 0
      Tests/RunCMake/Syntax/CMP0053-NameWithTabs-result.txt
  34. 12 0
      Tests/RunCMake/Syntax/CMP0053-NameWithTabs-stderr.txt
  35. 2 0
      Tests/RunCMake/Syntax/CMP0053-NameWithTabs.cmake
  36. 1 0
      Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted-result.txt
  37. 12 0
      Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted-stderr.txt
  38. 2 0
      Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted.cmake
  39. 1 0
      Tests/RunCMake/Syntax/CMP0053-ParenInENV-stderr.txt
  40. 3 0
      Tests/RunCMake/Syntax/CMP0053-ParenInENV.cmake
  41. 1 0
      Tests/RunCMake/Syntax/CMP0053-ParenInQuotedENV-stderr.txt
  42. 3 0
      Tests/RunCMake/Syntax/CMP0053-ParenInQuotedENV.cmake
  43. 28 0
      Tests/RunCMake/Syntax/CMP0053-WARN-stderr.txt
  44. 5 0
      Tests/RunCMake/Syntax/CMP0053-WARN.cmake
  45. 1 1
      Tests/RunCMake/Syntax/CMakeLists.txt
  46. 1 0
      Tests/RunCMake/Syntax/Escape2-result.txt
  47. 13 0
      Tests/RunCMake/Syntax/Escape2-stderr.txt
  48. 7 0
      Tests/RunCMake/Syntax/Escape2.cmake
  49. 1 0
      Tests/RunCMake/Syntax/EscapeChar-char-result.txt
  50. 12 0
      Tests/RunCMake/Syntax/EscapeChar-char-stderr.txt.in
  51. 3 0
      Tests/RunCMake/Syntax/EscapeChar-char.cmake.in
  52. 12 0
      Tests/RunCMake/Syntax/EscapeCharsAllowed-stderr.txt
  53. 26 0
      Tests/RunCMake/Syntax/EscapeCharsAllowed.cmake
  54. 42 0
      Tests/RunCMake/Syntax/EscapeCharsDisallowed.cmake
  55. 1 0
      Tests/RunCMake/Syntax/NameWithCarriageReturn-result.txt
  56. 12 0
      Tests/RunCMake/Syntax/NameWithCarriageReturn-stderr.txt
  57. 1 0
      Tests/RunCMake/Syntax/NameWithCarriageReturn.cmake
  58. 1 0
      Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-result.txt
  59. 12 0
      Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-stderr.txt
  60. 1 0
      Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted.cmake
  61. 1 0
      Tests/RunCMake/Syntax/NameWithEscapedSpaces-result.txt
  62. 12 0
      Tests/RunCMake/Syntax/NameWithEscapedSpaces-stderr.txt
  63. 1 0
      Tests/RunCMake/Syntax/NameWithEscapedSpaces.cmake
  64. 1 0
      Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-result.txt
  65. 12 0
      Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-stderr.txt
  66. 1 0
      Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted.cmake
  67. 1 0
      Tests/RunCMake/Syntax/NameWithEscapedTabs-result.txt
  68. 12 0
      Tests/RunCMake/Syntax/NameWithEscapedTabs-stderr.txt
  69. 1 0
      Tests/RunCMake/Syntax/NameWithEscapedTabs.cmake
  70. 1 0
      Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted-result.txt
  71. 12 0
      Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted-stderr.txt
  72. 1 0
      Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted.cmake
  73. 1 0
      Tests/RunCMake/Syntax/NameWithNewline-result.txt
  74. 12 0
      Tests/RunCMake/Syntax/NameWithNewline-stderr.txt
  75. 1 0
      Tests/RunCMake/Syntax/NameWithNewline.cmake
  76. 1 0
      Tests/RunCMake/Syntax/NameWithNewlineQuoted-result.txt
  77. 12 0
      Tests/RunCMake/Syntax/NameWithNewlineQuoted-stderr.txt
  78. 1 0
      Tests/RunCMake/Syntax/NameWithNewlineQuoted.cmake
  79. 1 0
      Tests/RunCMake/Syntax/NameWithSpaces-result.txt
  80. 12 0
      Tests/RunCMake/Syntax/NameWithSpaces-stderr.txt
  81. 1 0
      Tests/RunCMake/Syntax/NameWithSpaces.cmake
  82. 1 0
      Tests/RunCMake/Syntax/NameWithSpacesQuoted-result.txt
  83. 12 0
      Tests/RunCMake/Syntax/NameWithSpacesQuoted-stderr.txt
  84. 1 0
      Tests/RunCMake/Syntax/NameWithSpacesQuoted.cmake
  85. 1 0
      Tests/RunCMake/Syntax/NameWithTabs-result.txt
  86. 12 0
      Tests/RunCMake/Syntax/NameWithTabs-stderr.txt
  87. 1 0
      Tests/RunCMake/Syntax/NameWithTabs.cmake
  88. 1 0
      Tests/RunCMake/Syntax/NameWithTabsQuoted-result.txt
  89. 12 0
      Tests/RunCMake/Syntax/NameWithTabsQuoted-stderr.txt
  90. 1 0
      Tests/RunCMake/Syntax/NameWithTabsQuoted.cmake
  91. 1 0
      Tests/RunCMake/Syntax/ParenInVarName0-result.txt
  92. 12 0
      Tests/RunCMake/Syntax/ParenInVarName0-stderr.txt
  93. 4 0
      Tests/RunCMake/Syntax/ParenInVarName0.cmake
  94. 1 0
      Tests/RunCMake/Syntax/ParenInVarName1-result.txt
  95. 12 0
      Tests/RunCMake/Syntax/ParenInVarName1-stderr.txt
  96. 4 0
      Tests/RunCMake/Syntax/ParenInVarName1.cmake
  97. 43 0
      Tests/RunCMake/Syntax/RunCMakeTest.cmake
  98. 1 0
      Tests/RunCMake/Syntax/Unquoted2-stderr.txt
  99. 3 0
      Tests/RunCMake/Syntax/Unquoted2.cmake
  100. 1 0
      Tests/RunCMake/Syntax/UnterminatedBrace0-result.txt

+ 1 - 0
Tests/RunCMake/Syntax/CMP0053-At-NEW-stderr.txt

@@ -0,0 +1 @@
+^-->\${right}<--$

+ 9 - 0
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}<--")

+ 1 - 0
Tests/RunCMake/Syntax/CMP0053-At-OLD-stderr.txt

@@ -0,0 +1 @@
+^-->wrong<--$

+ 9 - 0
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}<--")

+ 27 - 0
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.$

+ 6 - 0
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@
+")

+ 21 - 0
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.$

+ 4 - 0
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@")

+ 56 - 0
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.
+
+--><--
+--><--
+--><--
+--><--$

+ 6 - 0
Tests/RunCMake/Syntax/CMP0053-NUL.cmake

@@ -0,0 +1,6 @@
+set(qnul "\0")
+set(nul \0)
+message(-->${nul}<--)
+message(-->${qnul}<--)
+message("-->${nul}<--")
+message("-->${qnul}<--")

+ 1 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn-result.txt

@@ -0,0 +1 @@
+1

+ 4 - 0
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\)$

+ 2 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn.cmake

@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message(${var\rwith\rcarriagereturn})

+ 2 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturnQuoted.cmake

@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message("${var\rwith\rcarriagereturn}")

+ 1 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces-result.txt

@@ -0,0 +1 @@
+1

+ 4 - 0
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\)

+ 2 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces.cmake

@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message(${var\ with\ escaped\ space})

+ 2 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpacesQuoted.cmake

@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message("${var\ with\ escaped\ space}")

+ 1 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs-result.txt

@@ -0,0 +1 @@
+1

+ 4 - 0
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\)

+ 2 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs.cmake

@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message(${var\	with\	escaped\	tab})

+ 2 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabsQuoted.cmake

@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message("${var\	with\	escaped\	tab}")

+ 1 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithNewline-result.txt

@@ -0,0 +1 @@
+1

+ 4 - 0
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\)$

+ 2 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithNewline.cmake

@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message(${var\nwith\nnewline})

+ 2 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithNewlineQuoted.cmake

@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message("${var\nwith\nnewline}")

+ 1 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithSpaces-result.txt

@@ -0,0 +1 @@
+1

+ 12 - 0
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\)$

+ 2 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithSpaces.cmake

@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message(${var with space})

+ 1 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted-result.txt

@@ -0,0 +1 @@
+1

+ 12 - 0
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\)$

+ 2 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted.cmake

@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message("${var with space}")

+ 1 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithTabs-result.txt

@@ -0,0 +1 @@
+1

+ 12 - 0
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\)$

+ 2 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithTabs.cmake

@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message(${var	with	tab})

+ 1 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted-result.txt

@@ -0,0 +1 @@
+1

+ 12 - 0
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\)$

+ 2 - 0
Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted.cmake

@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0053 NEW)
+message("${var	with	tab}")

+ 1 - 0
Tests/RunCMake/Syntax/CMP0053-ParenInENV-stderr.txt

@@ -0,0 +1 @@
+-->value<--

+ 3 - 0
Tests/RunCMake/Syntax/CMP0053-ParenInENV.cmake

@@ -0,0 +1,3 @@
+cmake_policy(SET CMP0053 NEW)
+set("ENV{e(x)}" value)
+message(-->$ENV{e\(x\)}<--)

+ 1 - 0
Tests/RunCMake/Syntax/CMP0053-ParenInQuotedENV-stderr.txt

@@ -0,0 +1 @@
+-->value<--

+ 3 - 0
Tests/RunCMake/Syntax/CMP0053-ParenInQuotedENV.cmake

@@ -0,0 +1,3 @@
+cmake_policy(SET CMP0053 NEW)
+set("ENV{e(x)}" value)
+message("-->$ENV{e\(x\)}<--")

+ 28 - 0
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.
+
+\\$

+ 5 - 0
Tests/RunCMake/Syntax/CMP0053-WARN.cmake

@@ -0,0 +1,5 @@
+macro (escape str)
+  message("${str}")
+endmacro ()
+
+escape("\\")

+ 1 - 1
Tests/RunCMake/Syntax/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.9)
+cmake_minimum_required(VERSION 2.8.12)
 project(${RunCMake_TEST} NONE)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)
 include(${RunCMake_TEST}.cmake)

+ 1 - 0
Tests/RunCMake/Syntax/Escape2-result.txt

@@ -0,0 +1 @@
+1

+ 13 - 0
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\)

+ 7 - 0
Tests/RunCMake/Syntax/Escape2.cmake

@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0053 NEW)
+
+macro (escape str)
+  message("${str}")
+endmacro ()
+
+escape("\\")

+ 1 - 0
Tests/RunCMake/Syntax/EscapeChar-char-result.txt

@@ -0,0 +1 @@
+1

+ 12 - 0
Tests/RunCMake/Syntax/EscapeChar-char-stderr.txt.in

@@ -0,0 +1,12 @@
+CMake Error at EscapeChar-@char@-@[email protected]:3 \(message\):
+  Syntax error in cmake code at
+
+    .*/Tests/RunCMake/Syntax/EscapeChar-@char@-@[email protected]:3
+
+  when parsing string
+
+    -->\\@char@<--
+
+  Invalid character escape '\\@char@'.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)

+ 3 - 0
Tests/RunCMake/Syntax/EscapeChar-char.cmake.in

@@ -0,0 +1,3 @@
+cmake_policy(SET CMP0053 NEW)
+
+message("-->\@char@<--")

+ 12 - 0
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<--$

+ 26 - 0
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<--)

+ 42 - 0
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()

+ 1 - 0
Tests/RunCMake/Syntax/NameWithCarriageReturn-result.txt

@@ -0,0 +1 @@
+1

+ 12 - 0
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\)$

+ 1 - 0
Tests/RunCMake/Syntax/NameWithCarriageReturn.cmake

@@ -0,0 +1 @@
+message(${var\rwith\rcarriagereturn})

+ 1 - 0
Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-result.txt

@@ -0,0 +1 @@
+1

+ 12 - 0
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\)$

+ 1 - 0
Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted.cmake

@@ -0,0 +1 @@
+message("${var\rwith\rcarriagereturn}")

+ 1 - 0
Tests/RunCMake/Syntax/NameWithEscapedSpaces-result.txt

@@ -0,0 +1 @@
+1

+ 12 - 0
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\)$

+ 1 - 0
Tests/RunCMake/Syntax/NameWithEscapedSpaces.cmake

@@ -0,0 +1 @@
+message(${var\ with\ escaped\ space})

+ 1 - 0
Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-result.txt

@@ -0,0 +1 @@
+1

+ 12 - 0
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\)$

+ 1 - 0
Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted.cmake

@@ -0,0 +1 @@
+message("${var\ with\ escaped\ space}")

+ 1 - 0
Tests/RunCMake/Syntax/NameWithEscapedTabs-result.txt

@@ -0,0 +1 @@
+1

+ 12 - 0
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\)$

+ 1 - 0
Tests/RunCMake/Syntax/NameWithEscapedTabs.cmake

@@ -0,0 +1 @@
+message(${var\	with\	escaped\	tab})

+ 1 - 0
Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted-result.txt

@@ -0,0 +1 @@
+1

+ 12 - 0
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\)$

+ 1 - 0
Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted.cmake

@@ -0,0 +1 @@
+message("${var\	with\	escaped\	tab}")

+ 1 - 0
Tests/RunCMake/Syntax/NameWithNewline-result.txt

@@ -0,0 +1 @@
+1

+ 12 - 0
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\)$

+ 1 - 0
Tests/RunCMake/Syntax/NameWithNewline.cmake

@@ -0,0 +1 @@
+message(${var\nwith\nnewline})

+ 1 - 0
Tests/RunCMake/Syntax/NameWithNewlineQuoted-result.txt

@@ -0,0 +1 @@
+1

+ 12 - 0
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\)$

+ 1 - 0
Tests/RunCMake/Syntax/NameWithNewlineQuoted.cmake

@@ -0,0 +1 @@
+message("${var\nwith\nnewline}")

+ 1 - 0
Tests/RunCMake/Syntax/NameWithSpaces-result.txt

@@ -0,0 +1 @@
+1

+ 12 - 0
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\)$

+ 1 - 0
Tests/RunCMake/Syntax/NameWithSpaces.cmake

@@ -0,0 +1 @@
+message(${var with space})

+ 1 - 0
Tests/RunCMake/Syntax/NameWithSpacesQuoted-result.txt

@@ -0,0 +1 @@
+1

+ 12 - 0
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\)$

+ 1 - 0
Tests/RunCMake/Syntax/NameWithSpacesQuoted.cmake

@@ -0,0 +1 @@
+message("${var with space}")

+ 1 - 0
Tests/RunCMake/Syntax/NameWithTabs-result.txt

@@ -0,0 +1 @@
+1

+ 12 - 0
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\)$

+ 1 - 0
Tests/RunCMake/Syntax/NameWithTabs.cmake

@@ -0,0 +1 @@
+message(${var	with	tab})

+ 1 - 0
Tests/RunCMake/Syntax/NameWithTabsQuoted-result.txt

@@ -0,0 +1 @@
+1

+ 12 - 0
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\)$

+ 1 - 0
Tests/RunCMake/Syntax/NameWithTabsQuoted.cmake

@@ -0,0 +1 @@
+message("${var	with	tab}")

+ 1 - 0
Tests/RunCMake/Syntax/ParenInVarName0-result.txt

@@ -0,0 +1 @@
+1

+ 12 - 0
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\)

+ 4 - 0
Tests/RunCMake/Syntax/ParenInVarName0.cmake

@@ -0,0 +1,4 @@
+cmake_policy(SET CMP0053 NEW)
+
+set("e(x)" value)
+message("-->${e(x)}<--")

+ 1 - 0
Tests/RunCMake/Syntax/ParenInVarName1-result.txt

@@ -0,0 +1 @@
+1

+ 12 - 0
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\)

+ 4 - 0
Tests/RunCMake/Syntax/ParenInVarName1.cmake

@@ -0,0 +1,4 @@
+cmake_policy(SET CMP0053 OLD)
+
+set("{e(x)}" value)
+message("-->${e(x)}<--")

+ 43 - 0
Tests/RunCMake/Syntax/RunCMakeTest.cmake

@@ -5,6 +5,14 @@ run_cmake(BOM-UTF-16-LE)
 run_cmake(BOM-UTF-16-BE)
 run_cmake(BOM-UTF-16-BE)
 run_cmake(BOM-UTF-32-LE)
 run_cmake(BOM-UTF-32-LE)
 run_cmake(BOM-UTF-32-BE)
 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(CommandSpaces)
 run_cmake(CommandTabs)
 run_cmake(CommandTabs)
 run_cmake(CommandNewlines)
 run_cmake(CommandNewlines)
@@ -25,6 +33,7 @@ run_cmake(StringNoSpace)
 run_cmake(OneLetter)
 run_cmake(OneLetter)
 run_cmake(Unquoted0)
 run_cmake(Unquoted0)
 run_cmake(Unquoted1)
 run_cmake(Unquoted1)
+run_cmake(Unquoted2)
 run_cmake(Bracket0)
 run_cmake(Bracket0)
 run_cmake(Bracket1)
 run_cmake(Bracket1)
 run_cmake(Bracket2)
 run_cmake(Bracket2)
@@ -43,12 +52,20 @@ run_cmake(BracketNoSpace3)
 run_cmake(BracketNoSpace4)
 run_cmake(BracketNoSpace4)
 run_cmake(BracketNoSpace5)
 run_cmake(BracketNoSpace5)
 run_cmake(Escape1)
 run_cmake(Escape1)
+run_cmake(Escape2)
+run_cmake(EscapeCharsAllowed)
+include("${RunCMake_SOURCE_DIR}/EscapeCharsDisallowed.cmake")
 run_cmake(ParenNoSpace0)
 run_cmake(ParenNoSpace0)
 run_cmake(ParenNoSpace1)
 run_cmake(ParenNoSpace1)
 run_cmake(ParenNoSpace2)
 run_cmake(ParenNoSpace2)
+run_cmake(ParenInVarName0)
+run_cmake(ParenInVarName1)
 run_cmake(UnterminatedCall1)
 run_cmake(UnterminatedCall1)
 run_cmake(UnterminatedCall2)
 run_cmake(UnterminatedCall2)
 run_cmake(UnterminatedString)
 run_cmake(UnterminatedString)
+run_cmake(UnterminatedBrace0)
+run_cmake(UnterminatedBrace1)
+run_cmake(UnterminatedBrace2)
 run_cmake(UnterminatedBracket0)
 run_cmake(UnterminatedBracket0)
 run_cmake(UnterminatedBracket1)
 run_cmake(UnterminatedBracket1)
 run_cmake(UnterminatedBracketComment)
 run_cmake(UnterminatedBracketComment)
@@ -65,3 +82,29 @@ run_cmake(AtWithVariableFile)
 run_cmake(AtWithVariableAtOnlyFile)
 run_cmake(AtWithVariableAtOnlyFile)
 run_cmake(ParenInENV)
 run_cmake(ParenInENV)
 run_cmake(ParenInQuotedENV)
 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)

+ 1 - 0
Tests/RunCMake/Syntax/Unquoted2-stderr.txt

@@ -0,0 +1 @@
+^\[\[UnquotedBracketArgument1\]\]$

+ 3 - 0
Tests/RunCMake/Syntax/Unquoted2.cmake

@@ -0,0 +1,3 @@
+cmake_policy(SET CMP0053 NEW)
+
+message(\[[Unquoted Bracket Argument 1]])

+ 1 - 0
Tests/RunCMake/Syntax/UnterminatedBrace0-result.txt

@@ -0,0 +1 @@
+1

部分文件因为文件数量过多而无法显示