diff options
author | Brad King <brad.king@kitware.com> | 2015-07-14 13:41:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-07-14 14:25:38 (GMT) |
commit | e5ca59b456d3a1a51d0b5387ec9d04a51beaa0be (patch) | |
tree | 6166bc6a150f2a319c946e6395fc3636267e7bb6 /Tests/RunCMake/if | |
parent | 0699e0d3e4305fc4e615c36b831d0171c2f8c757 (diff) | |
download | CMake-e5ca59b456d3a1a51d0b5387ec9d04a51beaa0be.zip CMake-e5ca59b456d3a1a51d0b5387ec9d04a51beaa0be.tar.gz CMake-e5ca59b456d3a1a51d0b5387ec9d04a51beaa0be.tar.bz2 |
Tests: Move command failure cases into RunCMake infrastructure
Move failure cases from the CMake.{If,List,While,GetProperty} tests over
to the RunCMake.{if,list,while,get_property} tests to use the more
modern infrastructure. This also avoids using REGEX_ESCAPE_STRING to
try to regex-match full paths.
Diffstat (limited to 'Tests/RunCMake/if')
-rw-r--r-- | Tests/RunCMake/if/InvalidArgument1-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/if/InvalidArgument1-stderr.txt | 8 | ||||
-rw-r--r-- | Tests/RunCMake/if/InvalidArgument1.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/if/RunCMakeTest.cmake | 1 |
4 files changed, 12 insertions, 0 deletions
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) |