diff options
Diffstat (limited to 'Tests/RunCMake')
106 files changed, 288 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index b90eff6..3746a7c 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -191,6 +191,7 @@ add_RunCMake_test(try_compile) add_RunCMake_test(try_run) add_RunCMake_test(set) add_RunCMake_test(variable_watch) +add_RunCMake_test(while) add_RunCMake_test(CMP0004) add_RunCMake_test(TargetPolicies) add_RunCMake_test(alias_targets) diff --git a/Tests/RunCMake/get_property/BadArgument-result.txt b/Tests/RunCMake/get_property/BadArgument-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/get_property/BadArgument-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/get_property/BadArgument-stderr.txt b/Tests/RunCMake/get_property/BadArgument-stderr.txt new file mode 100644 index 0000000..37c4477 --- /dev/null +++ b/Tests/RunCMake/get_property/BadArgument-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at BadArgument.cmake:1 \(get_property\): + get_property given invalid argument "FOO". +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/get_property/BadArgument.cmake b/Tests/RunCMake/get_property/BadArgument.cmake new file mode 100644 index 0000000..382dabb --- /dev/null +++ b/Tests/RunCMake/get_property/BadArgument.cmake @@ -0,0 +1 @@ +get_property(FOO GLOBAL PROPERTY FOO FOO) diff --git a/Tests/RunCMake/get_property/BadDirectory-result.txt b/Tests/RunCMake/get_property/BadDirectory-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/get_property/BadDirectory-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/get_property/BadDirectory-stderr.txt b/Tests/RunCMake/get_property/BadDirectory-stderr.txt new file mode 100644 index 0000000..98464f8 --- /dev/null +++ b/Tests/RunCMake/get_property/BadDirectory-stderr.txt @@ -0,0 +1,6 @@ +^CMake Error at BadDirectory.cmake:1 \(get_property\): + get_property DIRECTORY scope provided but requested directory was not + found. This could be because the directory argument was invalid or, it is + valid but has not been processed yet. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/get_property/BadDirectory.cmake b/Tests/RunCMake/get_property/BadDirectory.cmake new file mode 100644 index 0000000..cdbfa80 --- /dev/null +++ b/Tests/RunCMake/get_property/BadDirectory.cmake @@ -0,0 +1 @@ +get_property(FOO DIRECTORY NonExistentSubDir PROPERTY FOO) diff --git a/Tests/RunCMake/get_property/BadScope-result.txt b/Tests/RunCMake/get_property/BadScope-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/get_property/BadScope-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/get_property/BadScope-stderr.txt b/Tests/RunCMake/get_property/BadScope-stderr.txt new file mode 100644 index 0000000..4cc32c8 --- /dev/null +++ b/Tests/RunCMake/get_property/BadScope-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error at BadScope.cmake:1 \(get_property\): + get_property given invalid scope FOO. Valid scopes are GLOBAL, DIRECTORY, + TARGET, SOURCE, TEST, VARIABLE, CACHE, INSTALL. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/get_property/BadScope.cmake b/Tests/RunCMake/get_property/BadScope.cmake new file mode 100644 index 0000000..ea8566b --- /dev/null +++ b/Tests/RunCMake/get_property/BadScope.cmake @@ -0,0 +1 @@ +get_property(FOO FOO FOO) diff --git a/Tests/RunCMake/get_property/BadTarget-result.txt b/Tests/RunCMake/get_property/BadTarget-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/get_property/BadTarget-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/get_property/BadTarget-stderr.txt b/Tests/RunCMake/get_property/BadTarget-stderr.txt new file mode 100644 index 0000000..45a0df6 --- /dev/null +++ b/Tests/RunCMake/get_property/BadTarget-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error at BadTarget.cmake:1 \(get_property\): + get_property could not find TARGET FOO. Perhaps it has not yet been + created. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/get_property/BadTarget.cmake b/Tests/RunCMake/get_property/BadTarget.cmake new file mode 100644 index 0000000..9992dab --- /dev/null +++ b/Tests/RunCMake/get_property/BadTarget.cmake @@ -0,0 +1 @@ +get_property(FOO TARGET FOO PROPERTY FOO) diff --git a/Tests/RunCMake/get_property/BadTest-result.txt b/Tests/RunCMake/get_property/BadTest-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/get_property/BadTest-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/get_property/BadTest-stderr.txt b/Tests/RunCMake/get_property/BadTest-stderr.txt new file mode 100644 index 0000000..819c070 --- /dev/null +++ b/Tests/RunCMake/get_property/BadTest-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at BadTest.cmake:1 \(get_property\): + get_property given TEST name that does not exist: FOO +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/get_property/BadTest.cmake b/Tests/RunCMake/get_property/BadTest.cmake new file mode 100644 index 0000000..44bf3eb --- /dev/null +++ b/Tests/RunCMake/get_property/BadTest.cmake @@ -0,0 +1 @@ +get_property(FOO TEST FOO PROPERTY FOO) diff --git a/Tests/RunCMake/get_property/GlobalName-result.txt b/Tests/RunCMake/get_property/GlobalName-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/get_property/GlobalName-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/get_property/GlobalName-stderr.txt b/Tests/RunCMake/get_property/GlobalName-stderr.txt new file mode 100644 index 0000000..a7d4971 --- /dev/null +++ b/Tests/RunCMake/get_property/GlobalName-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at GlobalName.cmake:1 \(get_property\): + get_property given name for GLOBAL scope. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/get_property/GlobalName.cmake b/Tests/RunCMake/get_property/GlobalName.cmake new file mode 100644 index 0000000..497700c --- /dev/null +++ b/Tests/RunCMake/get_property/GlobalName.cmake @@ -0,0 +1 @@ +get_property(FOO GLOBAL FOO PROPERTY FOO) diff --git a/Tests/RunCMake/get_property/MissingArgument-result.txt b/Tests/RunCMake/get_property/MissingArgument-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/get_property/MissingArgument-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/get_property/MissingArgument-stderr.txt b/Tests/RunCMake/get_property/MissingArgument-stderr.txt new file mode 100644 index 0000000..8722712 --- /dev/null +++ b/Tests/RunCMake/get_property/MissingArgument-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at MissingArgument.cmake:1 \(get_property\): + get_property called with incorrect number of arguments +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/get_property/MissingArgument.cmake b/Tests/RunCMake/get_property/MissingArgument.cmake new file mode 100644 index 0000000..f0d004d --- /dev/null +++ b/Tests/RunCMake/get_property/MissingArgument.cmake @@ -0,0 +1 @@ +get_property() diff --git a/Tests/RunCMake/get_property/NoCache-result.txt b/Tests/RunCMake/get_property/NoCache-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/get_property/NoCache-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/get_property/NoCache-stderr.txt b/Tests/RunCMake/get_property/NoCache-stderr.txt new file mode 100644 index 0000000..defafb6 --- /dev/null +++ b/Tests/RunCMake/get_property/NoCache-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at NoCache.cmake:1 \(get_property\): + get_property not given name for CACHE scope. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/get_property/NoCache.cmake b/Tests/RunCMake/get_property/NoCache.cmake new file mode 100644 index 0000000..9719fe7 --- /dev/null +++ b/Tests/RunCMake/get_property/NoCache.cmake @@ -0,0 +1 @@ +get_property(FOO CACHE PROPERTY FOO) diff --git a/Tests/RunCMake/get_property/NoProperty-result.txt b/Tests/RunCMake/get_property/NoProperty-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/get_property/NoProperty-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/get_property/NoProperty-stderr.txt b/Tests/RunCMake/get_property/NoProperty-stderr.txt new file mode 100644 index 0000000..0ef147f --- /dev/null +++ b/Tests/RunCMake/get_property/NoProperty-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at NoProperty.cmake:1 \(get_property\): + get_property not given a PROPERTY <name> argument. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/get_property/NoProperty.cmake b/Tests/RunCMake/get_property/NoProperty.cmake new file mode 100644 index 0000000..bee230d --- /dev/null +++ b/Tests/RunCMake/get_property/NoProperty.cmake @@ -0,0 +1 @@ +get_property(FOO GLOBAL PROPERTY) diff --git a/Tests/RunCMake/get_property/NoSource-result.txt b/Tests/RunCMake/get_property/NoSource-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/get_property/NoSource-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/get_property/NoSource-stderr.txt b/Tests/RunCMake/get_property/NoSource-stderr.txt new file mode 100644 index 0000000..59fd0ad --- /dev/null +++ b/Tests/RunCMake/get_property/NoSource-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at NoSource.cmake:1 \(get_property\): + get_property not given name for SOURCE scope. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/get_property/NoSource.cmake b/Tests/RunCMake/get_property/NoSource.cmake new file mode 100644 index 0000000..89773c8 --- /dev/null +++ b/Tests/RunCMake/get_property/NoSource.cmake @@ -0,0 +1 @@ +get_property(FOO SOURCE PROPERTY FOO) diff --git a/Tests/RunCMake/get_property/NoTarget-result.txt b/Tests/RunCMake/get_property/NoTarget-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/get_property/NoTarget-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/get_property/NoTarget-stderr.txt b/Tests/RunCMake/get_property/NoTarget-stderr.txt new file mode 100644 index 0000000..a0e1a94 --- /dev/null +++ b/Tests/RunCMake/get_property/NoTarget-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at NoTarget.cmake:1 \(get_property\): + get_property not given name for TARGET scope. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/get_property/NoTarget.cmake b/Tests/RunCMake/get_property/NoTarget.cmake new file mode 100644 index 0000000..8f1fa23 --- /dev/null +++ b/Tests/RunCMake/get_property/NoTarget.cmake @@ -0,0 +1 @@ +get_property(FOO TARGET PROPERTY FOO) diff --git a/Tests/RunCMake/get_property/NoTest-result.txt b/Tests/RunCMake/get_property/NoTest-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/get_property/NoTest-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/get_property/NoTest-stderr.txt b/Tests/RunCMake/get_property/NoTest-stderr.txt new file mode 100644 index 0000000..c90a0ffc --- /dev/null +++ b/Tests/RunCMake/get_property/NoTest-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at NoTest.cmake:1 \(get_property\): + get_property not given name for TEST scope. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/get_property/NoTest.cmake b/Tests/RunCMake/get_property/NoTest.cmake new file mode 100644 index 0000000..045bd56 --- /dev/null +++ b/Tests/RunCMake/get_property/NoTest.cmake @@ -0,0 +1 @@ +get_property(FOO TEST PROPERTY FOO) diff --git a/Tests/RunCMake/get_property/RunCMakeTest.cmake b/Tests/RunCMake/get_property/RunCMakeTest.cmake index e420b5b..00eef34 100644 --- a/Tests/RunCMake/get_property/RunCMakeTest.cmake +++ b/Tests/RunCMake/get_property/RunCMakeTest.cmake @@ -8,3 +8,17 @@ run_cmake(source_properties) run_cmake(target_properties) run_cmake(test_properties) run_cmake(DebugConfigurations) + +run_cmake(MissingArgument) +run_cmake(GlobalName) +run_cmake(BadTest) +run_cmake(BadTarget) +run_cmake(BadScope) +run_cmake(BadDirectory) +run_cmake(BadArgument) +run_cmake(VariableName) +run_cmake(NoTest) +run_cmake(NoTarget) +run_cmake(NoSource) +run_cmake(NoProperty) +run_cmake(NoCache) diff --git a/Tests/RunCMake/get_property/VariableName-result.txt b/Tests/RunCMake/get_property/VariableName-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/get_property/VariableName-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/get_property/VariableName-stderr.txt b/Tests/RunCMake/get_property/VariableName-stderr.txt new file mode 100644 index 0000000..e9f3827 --- /dev/null +++ b/Tests/RunCMake/get_property/VariableName-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at VariableName.cmake:1 \(get_property\): + get_property given name for VARIABLE scope. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/get_property/VariableName.cmake b/Tests/RunCMake/get_property/VariableName.cmake new file mode 100644 index 0000000..9190f80 --- /dev/null +++ b/Tests/RunCMake/get_property/VariableName.cmake @@ -0,0 +1 @@ +get_property(FOO VARIABLE FOO PROPERTY FOO) diff --git a/Tests/RunCMake/if/InvalidArgument1-result.txt b/Tests/RunCMake/if/InvalidArgument1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/if/InvalidArgument1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/if/InvalidArgument1-stderr.txt b/Tests/RunCMake/if/InvalidArgument1-stderr.txt new file mode 100644 index 0000000..bf2a994 --- /dev/null +++ b/Tests/RunCMake/if/InvalidArgument1-stderr.txt @@ -0,0 +1,8 @@ +^CMake Error at InvalidArgument1.cmake:1 \(if\): + if given arguments: + + "NOT" "foo" "bar" "STREQUAL" "foo bar" + + Unknown arguments specified +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/if/InvalidArgument1.cmake b/Tests/RunCMake/if/InvalidArgument1.cmake new file mode 100644 index 0000000..b4fb97f --- /dev/null +++ b/Tests/RunCMake/if/InvalidArgument1.cmake @@ -0,0 +1,2 @@ +if (NOT foo bar STREQUAL "foo bar") +endif() diff --git a/Tests/RunCMake/if/RunCMakeTest.cmake b/Tests/RunCMake/if/RunCMakeTest.cmake index b5546a7..2c0c4d7 100644 --- a/Tests/RunCMake/if/RunCMakeTest.cmake +++ b/Tests/RunCMake/if/RunCMakeTest.cmake @@ -1,5 +1,6 @@ include(RunCMake) +run_cmake(InvalidArgument1) run_cmake(IsDirectory) run_cmake(IsDirectoryLong) run_cmake(elseif-message) diff --git a/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt b/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt new file mode 100644 index 0000000..a0f8837 --- /dev/null +++ b/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt @@ -0,0 +1,8 @@ +^CMake Warning \(dev\) at GET-CMP0007-WARN.cmake:4 \(list\): + Policy CMP0007 is not set: list command no longer ignores empty elements. + Run "cmake --help-policy CMP0007" for policy details. Use the cmake_policy + command to set the policy and suppress this warning. List has value = + \[;NEW;OLD\]. +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/list/GET-CMP0007-WARN.cmake b/Tests/RunCMake/list/GET-CMP0007-WARN.cmake new file mode 100644 index 0000000..833f352 --- /dev/null +++ b/Tests/RunCMake/list/GET-CMP0007-WARN.cmake @@ -0,0 +1,7 @@ +cmake_policy(VERSION 2.4) +set(thelist "" NEW OLD) + +list(GET thelist 1 thevalue) +if (NOT thevalue STREQUAL "OLD") + message(SEND_ERROR "returned element '${thevalue}', but expected 'OLD'") +endif() diff --git a/Tests/RunCMake/list/GET-InvalidIndex-result.txt b/Tests/RunCMake/list/GET-InvalidIndex-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/list/GET-InvalidIndex-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/list/GET-InvalidIndex-stderr.txt b/Tests/RunCMake/list/GET-InvalidIndex-stderr.txt new file mode 100644 index 0000000..0409464 --- /dev/null +++ b/Tests/RunCMake/list/GET-InvalidIndex-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at GET-InvalidIndex.cmake:2 \(list\): + list index: 3 out of range \(-3, 2\) +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/GET-InvalidIndex.cmake b/Tests/RunCMake/list/GET-InvalidIndex.cmake new file mode 100644 index 0000000..178295a --- /dev/null +++ b/Tests/RunCMake/list/GET-InvalidIndex.cmake @@ -0,0 +1,2 @@ +set(mylist alpha bravo charlie) +list(GET mylist 3 result) diff --git a/Tests/RunCMake/list/INSERT-InvalidIndex-result.txt b/Tests/RunCMake/list/INSERT-InvalidIndex-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/list/INSERT-InvalidIndex-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/list/INSERT-InvalidIndex-stderr.txt b/Tests/RunCMake/list/INSERT-InvalidIndex-stderr.txt new file mode 100644 index 0000000..6e15c0b --- /dev/null +++ b/Tests/RunCMake/list/INSERT-InvalidIndex-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at INSERT-InvalidIndex.cmake:2 \(list\): + list index: 3 out of range \(-3, 2\) +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/INSERT-InvalidIndex.cmake b/Tests/RunCMake/list/INSERT-InvalidIndex.cmake new file mode 100644 index 0000000..4103d97 --- /dev/null +++ b/Tests/RunCMake/list/INSERT-InvalidIndex.cmake @@ -0,0 +1,2 @@ +set(mylist alpha bravo charlie) +list(INSERT mylist 3 delta) diff --git a/Tests/RunCMake/list/InvalidSubcommand-result.txt b/Tests/RunCMake/list/InvalidSubcommand-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/list/InvalidSubcommand-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/list/InvalidSubcommand-stderr.txt b/Tests/RunCMake/list/InvalidSubcommand-stderr.txt new file mode 100644 index 0000000..74703d2 --- /dev/null +++ b/Tests/RunCMake/list/InvalidSubcommand-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at InvalidSubcommand.cmake:1 \(list\): + list does not recognize sub-command NO_SUCH_SUBCOMMAND +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/InvalidSubcommand.cmake b/Tests/RunCMake/list/InvalidSubcommand.cmake new file mode 100644 index 0000000..f35a118 --- /dev/null +++ b/Tests/RunCMake/list/InvalidSubcommand.cmake @@ -0,0 +1 @@ +list(NO_SUCH_SUBCOMMAND mylist) diff --git a/Tests/RunCMake/list/LENGTH-TooManyArguments-result.txt b/Tests/RunCMake/list/LENGTH-TooManyArguments-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/list/LENGTH-TooManyArguments-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/list/LENGTH-TooManyArguments-stderr.txt b/Tests/RunCMake/list/LENGTH-TooManyArguments-stderr.txt new file mode 100644 index 0000000..239e708 --- /dev/null +++ b/Tests/RunCMake/list/LENGTH-TooManyArguments-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at LENGTH-TooManyArguments.cmake:1 \(list\): + list sub-command LENGTH requires two arguments. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/LENGTH-TooManyArguments.cmake b/Tests/RunCMake/list/LENGTH-TooManyArguments.cmake new file mode 100644 index 0000000..327db6a --- /dev/null +++ b/Tests/RunCMake/list/LENGTH-TooManyArguments.cmake @@ -0,0 +1 @@ +list(LENGTH mylist result one_too_many) diff --git a/Tests/RunCMake/list/NoArguments-result.txt b/Tests/RunCMake/list/NoArguments-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/list/NoArguments-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/list/NoArguments-stderr.txt b/Tests/RunCMake/list/NoArguments-stderr.txt new file mode 100644 index 0000000..6fdf9cc --- /dev/null +++ b/Tests/RunCMake/list/NoArguments-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at NoArguments.cmake:1 \(list\): + list must be called with at least two arguments. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/NoArguments.cmake b/Tests/RunCMake/list/NoArguments.cmake new file mode 100644 index 0000000..7916aaa --- /dev/null +++ b/Tests/RunCMake/list/NoArguments.cmake @@ -0,0 +1 @@ +list() diff --git a/Tests/RunCMake/list/REMOVE_AT-InvalidIndex-result.txt b/Tests/RunCMake/list/REMOVE_AT-InvalidIndex-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_AT-InvalidIndex-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/list/REMOVE_AT-InvalidIndex-stderr.txt b/Tests/RunCMake/list/REMOVE_AT-InvalidIndex-stderr.txt new file mode 100644 index 0000000..6f58875 --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_AT-InvalidIndex-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at REMOVE_AT-InvalidIndex.cmake:2 \(list\): + list index: 3 out of range \(-3, 2\) +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/REMOVE_AT-InvalidIndex.cmake b/Tests/RunCMake/list/REMOVE_AT-InvalidIndex.cmake new file mode 100644 index 0000000..d4f3921 --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_AT-InvalidIndex.cmake @@ -0,0 +1,2 @@ +set(mylist alpha bravo charlie) +list(REMOVE_AT mylist 3) diff --git a/Tests/RunCMake/list/REMOVE_AT-NotList-result.txt b/Tests/RunCMake/list/REMOVE_AT-NotList-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_AT-NotList-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/list/REMOVE_AT-NotList-stderr.txt b/Tests/RunCMake/list/REMOVE_AT-NotList-stderr.txt new file mode 100644 index 0000000..d6e8d85 --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_AT-NotList-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at REMOVE_AT-NotList.cmake:2 \(list\): + list sub-command REMOVE_AT requires list to be present. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/REMOVE_AT-NotList.cmake b/Tests/RunCMake/list/REMOVE_AT-NotList.cmake new file mode 100644 index 0000000..5266c7f --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_AT-NotList.cmake @@ -0,0 +1,2 @@ +unset(nosuchlist) +list(REMOVE_AT nosuchlist 0) diff --git a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-result.txt b/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-stderr.txt b/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-stderr.txt new file mode 100644 index 0000000..96f3446 --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at REMOVE_DUPLICATES-NotList.cmake:2 \(list\): + list sub-command REMOVE_DUPLICATES requires list to be present. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList.cmake b/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList.cmake new file mode 100644 index 0000000..218f227 --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList.cmake @@ -0,0 +1,2 @@ +unset(nosuchlist) +list(REMOVE_DUPLICATES nosuchlist) diff --git a/Tests/RunCMake/list/REMOVE_DUPLICATES-TooManyArguments-result.txt b/Tests/RunCMake/list/REMOVE_DUPLICATES-TooManyArguments-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_DUPLICATES-TooManyArguments-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/list/REMOVE_DUPLICATES-TooManyArguments-stderr.txt b/Tests/RunCMake/list/REMOVE_DUPLICATES-TooManyArguments-stderr.txt new file mode 100644 index 0000000..f5c8711 --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_DUPLICATES-TooManyArguments-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at REMOVE_DUPLICATES-TooManyArguments.cmake:1 \(list\): + list sub-command REMOVE_DUPLICATES only takes one argument. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/REMOVE_DUPLICATES-TooManyArguments.cmake b/Tests/RunCMake/list/REMOVE_DUPLICATES-TooManyArguments.cmake new file mode 100644 index 0000000..b5eb46e --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_DUPLICATES-TooManyArguments.cmake @@ -0,0 +1 @@ +list(REMOVE_DUPLICATES mylist one_too_many) diff --git a/Tests/RunCMake/list/REMOVE_ITEM-NotList-result.txt b/Tests/RunCMake/list/REMOVE_ITEM-NotList-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_ITEM-NotList-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/list/REMOVE_ITEM-NotList-stderr.txt b/Tests/RunCMake/list/REMOVE_ITEM-NotList-stderr.txt new file mode 100644 index 0000000..c32a4c0 --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_ITEM-NotList-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at REMOVE_ITEM-NotList.cmake:2 \(list\): + list sub-command REMOVE_ITEM requires list to be present. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/REMOVE_ITEM-NotList.cmake b/Tests/RunCMake/list/REMOVE_ITEM-NotList.cmake new file mode 100644 index 0000000..079e7fb --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_ITEM-NotList.cmake @@ -0,0 +1,2 @@ +unset(nosuchlist) +list(REMOVE_ITEM nosuchlist alpha) diff --git a/Tests/RunCMake/list/REVERSE-NotList-result.txt b/Tests/RunCMake/list/REVERSE-NotList-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/list/REVERSE-NotList-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/list/REVERSE-NotList-stderr.txt b/Tests/RunCMake/list/REVERSE-NotList-stderr.txt new file mode 100644 index 0000000..e9dcc06 --- /dev/null +++ b/Tests/RunCMake/list/REVERSE-NotList-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at REVERSE-NotList.cmake:2 \(list\): + list sub-command REVERSE requires list to be present. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/REVERSE-NotList.cmake b/Tests/RunCMake/list/REVERSE-NotList.cmake new file mode 100644 index 0000000..977e2cc --- /dev/null +++ b/Tests/RunCMake/list/REVERSE-NotList.cmake @@ -0,0 +1,2 @@ +unset(nosuchlist) +list(REVERSE nosuchlist) diff --git a/Tests/RunCMake/list/REVERSE-TooManyArguments-result.txt b/Tests/RunCMake/list/REVERSE-TooManyArguments-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/list/REVERSE-TooManyArguments-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/list/REVERSE-TooManyArguments-stderr.txt b/Tests/RunCMake/list/REVERSE-TooManyArguments-stderr.txt new file mode 100644 index 0000000..7dabd9d --- /dev/null +++ b/Tests/RunCMake/list/REVERSE-TooManyArguments-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at REVERSE-TooManyArguments.cmake:1 \(list\): + list sub-command REVERSE only takes one argument. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/REVERSE-TooManyArguments.cmake b/Tests/RunCMake/list/REVERSE-TooManyArguments.cmake new file mode 100644 index 0000000..3a554a0 --- /dev/null +++ b/Tests/RunCMake/list/REVERSE-TooManyArguments.cmake @@ -0,0 +1 @@ +list(REVERSE mylist one_too_many) diff --git a/Tests/RunCMake/list/RunCMakeTest.cmake b/Tests/RunCMake/list/RunCMakeTest.cmake index 555051d..25d6a03 100644 --- a/Tests/RunCMake/list/RunCMakeTest.cmake +++ b/Tests/RunCMake/list/RunCMakeTest.cmake @@ -3,3 +3,22 @@ include(RunCMake) run_cmake(EmptyGet0) run_cmake(EmptyRemoveAt0) run_cmake(EmptyInsert-1) + +run_cmake(NoArguments) +run_cmake(InvalidSubcommand) +run_cmake(GET-CMP0007-WARN) + +run_cmake(GET-InvalidIndex) +run_cmake(INSERT-InvalidIndex) +run_cmake(REMOVE_AT-InvalidIndex) + +run_cmake(LENGTH-TooManyArguments) +run_cmake(REMOVE_DUPLICATES-TooManyArguments) +run_cmake(REVERSE-TooManyArguments) +run_cmake(SORT-TooManyArguments) + +run_cmake(REMOVE_AT-NotList) +run_cmake(REMOVE_DUPLICATES-NotList) +run_cmake(REMOVE_ITEM-NotList) +run_cmake(REVERSE-NotList) +run_cmake(SORT-NotList) diff --git a/Tests/RunCMake/list/SORT-NotList-result.txt b/Tests/RunCMake/list/SORT-NotList-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/list/SORT-NotList-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/list/SORT-NotList-stderr.txt b/Tests/RunCMake/list/SORT-NotList-stderr.txt new file mode 100644 index 0000000..396c5b5 --- /dev/null +++ b/Tests/RunCMake/list/SORT-NotList-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at SORT-NotList.cmake:2 \(list\): + list sub-command SORT requires list to be present. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/SORT-NotList.cmake b/Tests/RunCMake/list/SORT-NotList.cmake new file mode 100644 index 0000000..8f48e10 --- /dev/null +++ b/Tests/RunCMake/list/SORT-NotList.cmake @@ -0,0 +1,2 @@ +unset(nosuchlist) +list(SORT nosuchlist) diff --git a/Tests/RunCMake/list/SORT-TooManyArguments-result.txt b/Tests/RunCMake/list/SORT-TooManyArguments-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/list/SORT-TooManyArguments-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/list/SORT-TooManyArguments-stderr.txt b/Tests/RunCMake/list/SORT-TooManyArguments-stderr.txt new file mode 100644 index 0000000..d3fad60 --- /dev/null +++ b/Tests/RunCMake/list/SORT-TooManyArguments-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at SORT-TooManyArguments.cmake:1 \(list\): + list sub-command SORT only takes one argument. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/SORT-TooManyArguments.cmake b/Tests/RunCMake/list/SORT-TooManyArguments.cmake new file mode 100644 index 0000000..81b195d --- /dev/null +++ b/Tests/RunCMake/list/SORT-TooManyArguments.cmake @@ -0,0 +1 @@ +list(SORT mylist one_too_many) diff --git a/Tests/RunCMake/while/CMakeLists.txt b/Tests/RunCMake/while/CMakeLists.txt new file mode 100644 index 0000000..12cd3c7 --- /dev/null +++ b/Tests/RunCMake/while/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8.4) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/while/EndAlone-result.txt b/Tests/RunCMake/while/EndAlone-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/while/EndAlone-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/while/EndAlone-stderr.txt b/Tests/RunCMake/while/EndAlone-stderr.txt new file mode 100644 index 0000000..cd98687 --- /dev/null +++ b/Tests/RunCMake/while/EndAlone-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error at EndAlone.cmake:1 \(endwhile\): + endwhile An ENDWHILE command was found outside of a proper WHILE ENDWHILE + structure. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/while/EndAlone.cmake b/Tests/RunCMake/while/EndAlone.cmake new file mode 100644 index 0000000..82c09a0 --- /dev/null +++ b/Tests/RunCMake/while/EndAlone.cmake @@ -0,0 +1 @@ +endwhile() diff --git a/Tests/RunCMake/while/EndAloneArgs-result.txt b/Tests/RunCMake/while/EndAloneArgs-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/while/EndAloneArgs-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/while/EndAloneArgs-stderr.txt b/Tests/RunCMake/while/EndAloneArgs-stderr.txt new file mode 100644 index 0000000..a8c043d --- /dev/null +++ b/Tests/RunCMake/while/EndAloneArgs-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error at EndAloneArgs.cmake:1 \(endwhile\): + endwhile An ENDWHILE command was found outside of a proper WHILE ENDWHILE + structure. Or its arguments did not match the opening WHILE command. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/while/EndAloneArgs.cmake b/Tests/RunCMake/while/EndAloneArgs.cmake new file mode 100644 index 0000000..886d98c --- /dev/null +++ b/Tests/RunCMake/while/EndAloneArgs.cmake @@ -0,0 +1 @@ +endwhile(a) diff --git a/Tests/RunCMake/while/EndMismatch-stderr.txt b/Tests/RunCMake/while/EndMismatch-stderr.txt new file mode 100644 index 0000000..d7439e8 --- /dev/null +++ b/Tests/RunCMake/while/EndMismatch-stderr.txt @@ -0,0 +1,13 @@ +^CMake Warning \(dev\) at EndMismatch.cmake:3 \(include\): + A logical block opening on the line + + .*/Tests/RunCMake/while/EndMismatch.cmake:1 \(while\) + + closes on the line + + .*/Tests/RunCMake/while/EndMismatch.cmake:2 \(endwhile\) + + with mis-matching arguments. +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/while/EndMismatch.cmake b/Tests/RunCMake/while/EndMismatch.cmake new file mode 100644 index 0000000..5c338d6 --- /dev/null +++ b/Tests/RunCMake/while/EndMismatch.cmake @@ -0,0 +1,2 @@ +while(a) +endwhile(b) diff --git a/Tests/RunCMake/while/EndMissing-result.txt b/Tests/RunCMake/while/EndMissing-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/while/EndMissing-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/while/EndMissing-stderr.txt b/Tests/RunCMake/while/EndMissing-stderr.txt new file mode 100644 index 0000000..099a8b2 --- /dev/null +++ b/Tests/RunCMake/while/EndMissing-stderr.txt @@ -0,0 +1,6 @@ +^CMake Error at CMakeLists.txt:3 \(include\): + A logical block opening on the line + + .*/Tests/RunCMake/while/EndMissing.cmake:1 \(while\) + + is not closed.$ diff --git a/Tests/RunCMake/while/EndMissing.cmake b/Tests/RunCMake/while/EndMissing.cmake new file mode 100644 index 0000000..1abaaaf --- /dev/null +++ b/Tests/RunCMake/while/EndMissing.cmake @@ -0,0 +1 @@ +while(a) diff --git a/Tests/RunCMake/while/MissingArgument-result.txt b/Tests/RunCMake/while/MissingArgument-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/while/MissingArgument-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/while/MissingArgument-stderr.txt b/Tests/RunCMake/while/MissingArgument-stderr.txt new file mode 100644 index 0000000..7ff0971 --- /dev/null +++ b/Tests/RunCMake/while/MissingArgument-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at MissingArgument.cmake:1 \(while\): + while called with incorrect number of arguments +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/while/MissingArgument.cmake b/Tests/RunCMake/while/MissingArgument.cmake new file mode 100644 index 0000000..32eaa26 --- /dev/null +++ b/Tests/RunCMake/while/MissingArgument.cmake @@ -0,0 +1 @@ +while() diff --git a/Tests/RunCMake/while/RunCMakeTest.cmake b/Tests/RunCMake/while/RunCMakeTest.cmake new file mode 100644 index 0000000..7da80ac --- /dev/null +++ b/Tests/RunCMake/while/RunCMakeTest.cmake @@ -0,0 +1,7 @@ +include(RunCMake) + +run_cmake(MissingArgument) +run_cmake(EndMissing) +run_cmake(EndMismatch) +run_cmake(EndAlone) +run_cmake(EndAloneArgs) |