diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/Syntax/ForEachBracket1-stderr.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/ForEachBracket1.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/FunctionBracket1-stderr.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/FunctionBracket1.cmake | 6 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/MacroBracket1-stderr.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/MacroBracket1.cmake | 6 | ||||
-rw-r--r-- | Tests/RunCMake/Syntax/RunCMakeTest.cmake | 3 |
7 files changed, 24 insertions, 0 deletions
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/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/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake index 4f42a07..5f05cfc 100644 --- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake +++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake @@ -12,6 +12,9 @@ run_cmake(CommandComments) 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) |