diff options
Diffstat (limited to 'Tests')
14 files changed, 42 insertions, 0 deletions
diff --git a/Tests/RunCMake/add_custom_command/AppendLiteralQuotes-result.txt b/Tests/RunCMake/add_custom_command/AppendLiteralQuotes-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/add_custom_command/AppendLiteralQuotes-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/add_custom_command/AppendLiteralQuotes-stderr.txt b/Tests/RunCMake/add_custom_command/AppendLiteralQuotes-stderr.txt new file mode 100644 index 0000000..503385f --- /dev/null +++ b/Tests/RunCMake/add_custom_command/AppendLiteralQuotes-stderr.txt @@ -0,0 +1,7 @@ +CMake Error at AppendLiteralQuotes.cmake:2 \(add_custom_command\): + COMMAND may not contain literal quotes: + + "c" + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/add_custom_command/AppendLiteralQuotes.cmake b/Tests/RunCMake/add_custom_command/AppendLiteralQuotes.cmake new file mode 100644 index 0000000..038fb3f --- /dev/null +++ b/Tests/RunCMake/add_custom_command/AppendLiteralQuotes.cmake @@ -0,0 +1,2 @@ +add_custom_command(OUTPUT a COMMAND b) +add_custom_command(OUTPUT a COMMAND "\"c\"" APPEND) diff --git a/Tests/RunCMake/add_custom_command/LiteralQuotes-result.txt b/Tests/RunCMake/add_custom_command/LiteralQuotes-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/add_custom_command/LiteralQuotes-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/add_custom_command/LiteralQuotes-stderr.txt b/Tests/RunCMake/add_custom_command/LiteralQuotes-stderr.txt new file mode 100644 index 0000000..e7d6155 --- /dev/null +++ b/Tests/RunCMake/add_custom_command/LiteralQuotes-stderr.txt @@ -0,0 +1,7 @@ +CMake Error at LiteralQuotes.cmake:1 \(add_custom_command\): + COMMAND may not contain literal quotes: + + "b" + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/add_custom_command/LiteralQuotes.cmake b/Tests/RunCMake/add_custom_command/LiteralQuotes.cmake new file mode 100644 index 0000000..046ddd9 --- /dev/null +++ b/Tests/RunCMake/add_custom_command/LiteralQuotes.cmake @@ -0,0 +1 @@ +add_custom_command(OUTPUT a COMMAND "\"b\"") diff --git a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake index 20097b7..270df2f 100644 --- a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake +++ b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake @@ -1,15 +1,18 @@ include(RunCMake) +run_cmake(AppendLiteralQuotes) run_cmake(AppendNoOutput) run_cmake(AppendNotOutput) run_cmake(BadArgument) run_cmake(GeneratedProperty) +run_cmake(LiteralQuotes) run_cmake(NoArguments) run_cmake(NoOutputOrTarget) run_cmake(OutputAndTarget) run_cmake(SourceByproducts) run_cmake(SourceUsesTerminal) run_cmake(TargetImported) +run_cmake(TargetLiteralQuotes) run_cmake(TargetNotInDir) if(${RunCMake_GENERATOR} MATCHES "Visual Studio ([^89]|[89][0-9])") diff --git a/Tests/RunCMake/add_custom_command/TargetLiteralQuotes-result.txt b/Tests/RunCMake/add_custom_command/TargetLiteralQuotes-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/add_custom_command/TargetLiteralQuotes-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/add_custom_command/TargetLiteralQuotes-stderr.txt b/Tests/RunCMake/add_custom_command/TargetLiteralQuotes-stderr.txt new file mode 100644 index 0000000..c4589b4 --- /dev/null +++ b/Tests/RunCMake/add_custom_command/TargetLiteralQuotes-stderr.txt @@ -0,0 +1,7 @@ +CMake Error at TargetLiteralQuotes.cmake:2 \(add_custom_command\): + COMMAND may not contain literal quotes: + + "b" + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/add_custom_command/TargetLiteralQuotes.cmake b/Tests/RunCMake/add_custom_command/TargetLiteralQuotes.cmake new file mode 100644 index 0000000..5f11ed1 --- /dev/null +++ b/Tests/RunCMake/add_custom_command/TargetLiteralQuotes.cmake @@ -0,0 +1,2 @@ +add_library(a) +add_custom_command(TARGET a POST_BUILD COMMAND "\"b\"") diff --git a/Tests/RunCMake/add_custom_target/LiteralQuotes-result.txt b/Tests/RunCMake/add_custom_target/LiteralQuotes-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/add_custom_target/LiteralQuotes-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/add_custom_target/LiteralQuotes-stderr.txt b/Tests/RunCMake/add_custom_target/LiteralQuotes-stderr.txt new file mode 100644 index 0000000..bc5187a --- /dev/null +++ b/Tests/RunCMake/add_custom_target/LiteralQuotes-stderr.txt @@ -0,0 +1,7 @@ +CMake Error at LiteralQuotes.cmake:1 \(add_custom_target\): + COMMAND may not contain literal quotes: + + "b" + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/add_custom_target/LiteralQuotes.cmake b/Tests/RunCMake/add_custom_target/LiteralQuotes.cmake new file mode 100644 index 0000000..9870608 --- /dev/null +++ b/Tests/RunCMake/add_custom_target/LiteralQuotes.cmake @@ -0,0 +1 @@ +add_custom_target(a COMMAND "\"b\"") diff --git a/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake b/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake index d80ca19..49c7d3e 100644 --- a/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake +++ b/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake @@ -5,6 +5,7 @@ run_cmake(GeneratedProperty) run_cmake(NoArguments) run_cmake(BadTargetName) run_cmake(ByproductsNoCommand) +run_cmake(LiteralQuotes) run_cmake(UsesTerminalNoCommand) function(run_TargetOrder) |